|
-
Mar 24th, 2004, 10:01 AM
#1
Thread Starter
New Member
Update datatable by code
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?
>Lars<
-
Mar 25th, 2004, 04:29 AM
#2
Thread Starter
New Member
I've found out it only happens when I have added rows to the datatable using InsertAt()
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|