The Syncfusion® native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
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.
Thanks
Nicola
ADAdministrator Syncfusion Team May 19, 2004 01:18 PM UTC
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 01:26 PM UTC
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.
-Nicola
ADAdministrator Syncfusion Team May 19, 2004 02:49 PM UTC
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.