We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

CurrentCellValidating and CurrentCellMoving

Thread ID:





14158 May 19,2004 08:28 AM May 19,2004 10:49 AM Windows Forms 3
Tags: GridControl
Asked On May 19, 2004 08:28 AM

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

Administrator [Syncfusion]
Replied On 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?

Replied On May 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. -Nicola

Administrator [Syncfusion]
Replied On 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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.