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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CurrentCellValidating and CurrentCellMoving

Thread ID:





14158 May 19,2004 12:28 PM UTC May 19,2004 02:49 PM UTC WinForms 3
Tags: GridControl
Asked On May 19, 2004 12:28 PM UTC

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 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?

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

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


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon