DataTable Rowstate

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.
 
H

Hussein Abuthuraya[MSFT]

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.
 
P

Patrick

Hussein,
Thanks for the reply, but I'm not using bound controls.
Do you have any other suggestions? Thanks
 
H

Hussein Abuthuraya[MSFT]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top