I''m wondering how I can get around a problem I am having with CurrentCellValidating. I am handing the CurrentCellValidating event myself and if the cell value is not between a certain range I set e.Cancel = true.
If I set e.Cancel = true and use the enter key to leave the currentCell everything works fine. However if I use the arrow keys to leave the cell the CurrentCellMoving event gets raised. I could check flag in CurrentCellMoving but I would rather not do this. Any help would be appreciated.
ADAdministrator Syncfusion Team May 19, 2004 09:18 AM
CurrentCellMoving should be raised anytime you leave one cell to go to another. This includes moves caused by the enter key, or the arrow keys, or the mouse. So, you should see CurrentCellMoving when you press the enter key to leave the current cell.
Normally, setting e.Cancel = true in CurrentCellValidating prevents the user from leaving the currentcell.
Exactly what problem are you seeing?
NINicolaMay 19, 2004 09:26 AM
The problem I''m seeing is that I''m seting e.Cancel=true in CurrentCellValidating and the CurrentCellMoving event is still being raised. I thought this wasn''t supposed to happen but maybe I''m misunderstanding something.
ADAdministrator Syncfusion Team May 19, 2004 10:49 AM
These events should work like this.
gridControl1_CurrentCellMoving is fired before gridControl1_CurrentCellValidating. And it is fired whether or not the cell value has changed. CurrentCellValidating is fired only if the current cell is modified.