I need to know if an XtraGrid
has been modified (value changed or rows added).
I can make a boolean var
and change it on GridView_CellValueChanged
:
void suppGridView_CellValueChanged(object sender, CellValueChangedEventArgs e) {
isModified = true;
}
or
I can read all DataSource and check the DataRow.RowState property value (Modified
or Added
):
foreach (DataRow row in dataSource.Rows) {
if (row.RowState == DataRowState.Modified || row.RowState == DataRowState.Added)
return true;
}
Do you know a simpler method?