(16-09-18, 12:05 AM)atefkhalf2004 كتب : حضراتكم المطلوب فورم به داتاجريدفيو بها
م التاريخ وارد منصرف رصيد
1 1/1/2000 200 0 200
2 5/2/2000 0 150 50
3 7/4/2000 300 0 350
4
وهكذا شكرا
كود :
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim balance As Double = 700 ' الرصيد الافتتاحي
For Each r As DataGridViewRow In Me.DataGridView1.Rows
balance = balance + Val(r.Cells("وارد").Value) - Val(r.Cells("منصرف").Value)
r.Cells("رصيد").Value = balance
Next
End Sub