AD
Administrator
Syncfusion Team
June 19, 2003 06:08 PM UTC
Both CurrentCellChanging and CurrentCellChanged get fired with each keystroke. If you want an event that is fired only when the user indicates he is finished (by leaving the cell), then try CurrentCellValidating. It is a one-time event only for changed cells.
If for some reason, you want to turn off the change events, you can use
this.gridControl1.SuspendChangeEvents();
//later
this.gridControl1.ResumeChangeEvents();
There event also grid.CurrentCell.SuspendEvent/ResumeEvents calls.
AD
Administrator
Syncfusion Team
June 19, 2003 10:12 PM UTC
Please note also that you have to subscribe to these events only once for all cells. "CurrentCell" is a object that represents any cell in the grid and only one cell can be the current cell at any time.
You can find out about the current cell position by inspecting the EventArgs passed to that event handler or by looking at CurrentCell.RowIndex/ColIndex.
In the 1.6 version there are some good samples under "Samples\CellTypes" where you can have a complete trace log of CurrentCellXXX events while editing a cell and navigating trough the grid.
Stefan