Hi.. All How To Calculate Total.. I Expect This OUTPUT
Regno Name Class Jan Feb Mar Apr TOTAL
A100 AAA I 500 150 120 54 824
A200 BBB I 450 50 0 0 500
Please Tell me.. how to i do..
Here I am Using This CODE
For j1 As Integer = 0 To DataGridView1.Rows.Count - 1
For ij As Integer = 3 To DataGridView1.Columns.Count - 1
With Me.DataGridView1.Rows.GetFirstRow(Me.DataGridView1.Rows.Count - 1)
If IsDBNull(DataGridView1(ij, j1).Value) <> True Then
total = total + DataGridView1(ij, j1).Value
End If
End With
Next ij
DataGridView1.Rows(j1).Cells("TOTAL").Value = total
Next j1
Now This CODE SHOW LIKE THIS OUTPUT
Regno Name Class Jan Feb Mar Apr TOTAL
A100 AAA I 500 150 120 54 824
A200 BBB I 450 50 0 0 1324