Does the wingrid have a property that can be viewed to see if a row has been modified, added, or deleted.
Thanks
Sal
If you are bound to a DataTable, and the UltraGridRows represent DataRowView objects, you can get a reference to the underlying DataRowView via the UltraGridRow's ListObject property (upcast it to typeof(DataRowView)). Once you have that, you can get a reference to the underlying DataRow via that DataRowView's Row property. DataRow exposes a RowState property, which contains information like whether the row was added, deleted, or modified.
Note that UltraGridRow also exposes a DataChanged property, which tells you if the data in any cells have been modified.
Brian Fallon"]Note that UltraGridRow also exposes a DataChanged property, which tells you if the data in any cells have been modified.
True, and i thought that would help me, but i'm using a UltraGridRowEditTemplate and when i add a new row, the property is marked false. Thus the question i have posted.
My guess is that the property in the grid will only return true if you edit the data in the grid. If you edit the data through the RowEditTemplate, or though some other bound control, then the grid will not know about it.
You should probably rely on the state information provided by the DataSet/DataTable.
Thanks for the input, I will try the suggestion. I will let you know what happens.
Thank you Brian, your suggestion worked.
Here is the sample code is used:
foreach (UltraGridRow row in UltraGrid1.Rows) { DataRowView drv = (DataRowView) row.ListObject; MessageBox.Show("Row State: " + drv.Row.RowState); }