L
Lars E.
Hei,
In my vb.net winapp I have a datagrid that uses a datatable
(dtGridReport) as datasource.
When I try to update one field in my datatable something strange
happens.
It looks as if a row is added to the datagrid, a new row appears,
which is a copy of the row I wanted to update.
The datatable still contains the correct number of rows.
An example of code to change the data which causes the problem to
occur:
Dim dr As DataRow() = dtGridReport.Select("sFkAccountID = '0301'")
If dr.GetUpperBound(0) = 0 Then
dr(0)("sValue") = "whatever"
End If
Does anybody know why this happens or what I can do to fix it?
In my vb.net winapp I have a datagrid that uses a datatable
(dtGridReport) as datasource.
When I try to update one field in my datatable something strange
happens.
It looks as if a row is added to the datagrid, a new row appears,
which is a copy of the row I wanted to update.
The datatable still contains the correct number of rows.
An example of code to change the data which causes the problem to
occur:
Dim dr As DataRow() = dtGridReport.Select("sFkAccountID = '0301'")
If dr.GetUpperBound(0) = 0 Then
dr(0)("sValue") = "whatever"
End If
Does anybody know why this happens or what I can do to fix it?