Hi,
I am trying to fires an event when there is some text change in my grid. I tried AfterRowUpdate, AfterCellUpdate and BeforeRowUpdate. I don't know why when I just click a cell of a row, without changing anything, those event already fires.
thanks,
grid.EventManager.SetEnabled(GridEventIds.AfterRowUpdate, false);
Why not just check for which column is being updated in AfterCellUpdate? If it's a cacluated column, do nothing.
Or, you could use the AfterExitEditMode even.
Hi Mike,
I think CellChange event is the only one that I can use for my case.
Thanks,
I tried to create unbound column as below
band.Columns["MyColumnName"].DataType = Type.GetType("System.Decimal");
band.Columns["MyColumnName"].Formula = "if ( [Column1] , [Column2] / [Column1], 0 )";
and the event AfterCellUpdate event still fires when I just click on one of the cell of the grid.
Is there anyway I can prevent this event to fires when I just click on the cell?
Thank you for your response. I just update to the new version 8.3, but it's not helping.
I haven't try the unbound column yet. What I did before was adding a column to the datatable like this
datatable.Column.Add(new DataColumn("NewColumn", Type.GetType("System.Decimal"), "[Column1] / [Column2]"));
it works, but I don't like it much since I have to check for Column2 for zero value and have to rebind the datatable to the grid whenever the value of one of that column is changed. It's so inconvinience that way. Using the grid formula, I can take advantage of the change without doing anything. However, I have to update back to the database whenever the change in the cells happens. I have to find a way for the formula to work and get the AfterCellUpdate event fires the way it should be.
Thanks.