Funny problem updating the database
I have the following sub to change every cell in one column on a datagridview. I can see they all changed correctly. But then when I go update to to the database, for some funny reason, always the first cell on the column, has the old value updated into the database. Anybody know why?
VB Code:
Private sub changeDetailColumnValue()
Dim i as Integer
For i = 0 to (ds.Tables("myTable").Rows.Count - 1)
DetaGridView.Rows(i).Cells(3).Value = "Test Completed"
Next
End Sub
Re: Funny problem updating the database
I noticed that since the row indicator is on the first row. After I changed the cell values, if I click on any other row on the datagridview, then I don't have this problem.
Is it possible to move the row indicator down to the empty row after the last row?