18-05-19, 03:36 PM
السلام عليكم....
قم بعمل نسخ ولصق لهذا الكود كاملا وضعة في مشروعك وجرب.
قم بعمل نسخ ولصق لهذا الكود كاملا وضعة في مشروعك وجرب.
كود :
Private Sub DataGridView1_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles DataGridView1.CellFormatting
On Error Resume Next
Dim sumc As Double = 0
For Each rc As DataGridViewRow In Me.DataGridView1.Rows
sumc = rc.Cells(3).Value - rc.Cells(2).Value * rc.Cells(4).Value
rc.Cells(5).Value = sumc
Next
End Subالمبرمج لا يفكر في المشكلة بل في الحل!!

