Hi
I have an simple 2 level ultragrid. the updatemode is set to RowChangedOrLostFocus and the ultragrid'sdatqasource is set to a bindingsource which points to a datable in a strongly typed dataset.
the table has registred it's columnchanged event, the same is true for the grids BeforeExitEditMode
basically everything works, values get updated etc. and correctly transmitted to the database (later).but the the rowstate of my datarow is always unchanged even when I change a value the rowstate is unchanged in the table's ColumnChanged event and I don't know why, the rowstate should be "modified",shouldn't it?
is this normal behaviour, could something in the ultragrid causing this?
thanks
Hi,
My guess is that you must be checking the RowState on the wrong row or something. If RowState were not being updated, then you would not be able to update the data on the back end because the DataSet would not think anything changed and it would therefore not updated anything.
When exactly are you checking the RowState and how are you checking it?
Hi Mike,
I'm checking in the columnchanged event of my table. the event gets registered when I initialize my dataset and it also gets called, but won't go into the if clause because the rowstate is "unchanged"
like
public void Table_ColumnChanged(object sender, DataColumnChangeEventArgs e) { if(e.Row.RowState != DataRowState.Deleted && e.Row.RowState != DataRowState.Unchanged && !e.Column.AutoIncrement) { Delegate Del = Delegate.CreateDelegate(typeof(ValidationDelegate), e.Row, String.Format(VALIDATION_METHOD_MASK, e.Column.ColumnName), false, false); if(Del != null) { ValidationErrorObject Vae = ((ValidationDelegate)Del).Invoke(); if(Vae.IsValid) e.Row.SetColumnError(e.Row.Table.Columns[e.Column.ColumnName].ColumnName, ""); else e.Row.SetColumnError(e.Row.Table.Columns[e.Column.ColumnName].ColumnName, Vae.ErrorString); } } }