DataTable Rowstate

  • Thread starter Thread starter Patrick
  • Start date Start date
P

Patrick

While using a Dataview to modify the underlying Table, I
ran into an instance where I can modify a value in a row
and verify using the QuickWatch that the value has
changed, but the rowstate = UnChanged. This causes the
DataSet.HasChanges to be false and the DataSet.GetChanges
() to be null, therefor the record will not update. This
method works on all other records except this one.
 
Patrick,

If you are modifying this data from some bound controls like TextBoxes, make sure to call EndEdit before calling the Update to that the RowState changes. When modifying
data inside a DataGrid for example, it does call EndEdit internally.

I hope this helps!

Thanks,
Hussein Abuthuraya
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
 
Hussein,
Thanks for the reply, but I'm not using bound controls.
Do you have any other suggestions? Thanks
 
If you provide a simple repro scenario that shows this problem, it would make it easier to suggest something.


Thanks,
Hussein Abuthuraya
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
 
Back
Top