I have a GidView with a bindingdatasource. The datatable for the GridView is populated by a selectstatement via a MySQL database.
The data in the Gridview is edited in a form with some textboxes and comboboxes. When I select a row in my GridView the data for that record can be edited. When the editing is done, the data will be updated after clicking a button. The data is saved in the database correctly, but in my GridView the updatet data is not visible. When I re-populate the GridView from the database the edited data is visible.
I tried to manualy edit the data in the datatable, but then other fields in the datatable are not updating.
Dim intTableRow As Integer
For i As Integer = 0 To table.Rows.Count - 1
If table.Rows(i)("artikelId") = intArtikelId Then
intTableRow = i
Exit For
End If
Next
table.Rows(intTableRow).BeginEdit()
If Not GridViewArtikelen.GetRowCellValue(intRow, "certificaatId") Is DBNull.Value Then
table.Rows(intTableRow)("certificaat_geldig_tot") = DateAdd(DateInterval.Year, CDbl(txtGeldigheidsduurCertificaat.Text), table.Rows(intTableRow)("datum_certificaat"))
''table.Rows(intTableRow)("geldigheidsduur") = CDec(Val(txtGeldigheidsduur.Text))
'table.Rows(intTableRow).EndEdit()
End If
Is this because I corrupt my datarow of the datatable or do I something wrong?