18-05-19, 05:44 PM
(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
أشكرك جزيل الشكر اخي العزيز ولكن في الحساب تكون الأعداد ملخبطه والناتج خطا
واتمنى ان تفيدني ولك جزيل الشكر مرة أخرى

