A new issue !!
I have a checkbox column in the datagridview and also a column named "partqty" which displays the quantity of materails available.. I would want that when the user checks on the checkbox, the quantities of checked rows should be added and displayed in the textbox..
I tired something like this.. But it displays 0(zero) in the textbox.. Please help..
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
'For Each _rw As DataGridViewRow In dataGridView1.Rows
' If _rw.Cells(0).Value = True Then
Dim totalSum As Integer
For i As Integer = 0 To HemDatabase1DataSet5.Tables(0).Rows.Count - 1
totalSum += HemDatabase1DataSet5.Tables(0).Rows(i).Item("partqty")
Next
textBox5.Text = totalSum.ToString()
' End If
'Next
End Sub