I would like to know why the BeforeRowUpdate event is fired twice when the e.Cancel property is set to true, any idea? My test grid has a DataTable data source like this:
public DataSet CreateDataStructure() { DataTable dt = new DataTable(); DataColumn dc = new DataColumn(); dc.ColumnName = "Col1"; dc.DataType = typeof( string ); dc.AllowDBNull = false; dt.Columns.Add( dc );
dc = new DataColumn(); dc.ColumnName = "Col2"; dc.DataType = typeof( string ); dt.Columns.Add( dc );
ds.Tables.Add( dt ); return ds; }
And the BeforeRowUpdate event handler is:
private void ultraGrid1_BeforeRowUpdate( object sender, CancelableRowEventArgs e ) { // When the next line is commented the BeforeRowUpdate event is fired only once after a cell is edited. if( e.Row.Cells[ "Col1" ].Text != "AA" ) e.Cancel = true; }
Other properties I set are:
ultraGrid1.UpdateMode = Infragistics.Win.UltraWinGrid.UpdateMode.OnCellChangeOrLostFocus; ultraGrid1.RowUpdateCancelAction = Infragistics.Win.UltraWinGrid.RowUpdateCancelAction.RetainDataAndActivation;
Hello Felix,
Thank you for your response.
You do not have the latest Service Release for NetAdvantage 2012 Volume 1 for Windows Forms. The latest Service Release is build 2135.
hi, what version is this issue been resolved on? i have version 12.1.20121.2054 and i am experiencing this problem.
Hello,
This issue has been resolved in the latest Service Release as of the date of this post.
Ok, thank you Mike.
Hi,
I tried this out and I get the same results, the event fires twice. This is clearly a bug, so I forward this thread over to Infragistics Developer Support so they can create a case for you and write this up as a bug for developer review.