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.

Suspending Events don''t allow the focus to move out from CurrentCell

Thread ID:

Created:

Platform:

Replies:

56089 Feb 9,2007 03:49 AM General Discussion 0
loading
Tags: General Discussion
Ashish Agarwal
Asked On February 9, 2007 03:49 AM

Hi,

I am using Syncfusion DataGrid 4.2.0.37.
I am using CurrentCellValidating event to Validate the data Entered by the user, if the the data is invalid then the user is not allowed to tab out of the current cell and if the entered data is valid then pressing the tab key should move the focus out of the grid and a new row should be added to the grid so that the user can enter new data.
Now, the problem I faced was that as soon as I add a new row in the grid by increasing the RowCount of the grid in the CurrentCellValidating Event it again raise the same Event i.e. CurrentCellValidating event is raised from currently executing CurrentCellValidating event handler which create inconsistencies. To suppress that I suspended the current cell events by .CurrentCell.SuspendEvents before adding the new row and used .CurrentCell.ResumeEvents to resume events after adding the new row.
Now, by doing so the new problem I am facing is that on pressing tab key because of suspending events in the CurrentCellValidating event the focus does not move out of the CurrentCell after the Event Handler completes.

Please suggest what needs to be done.
Thanks.

CONFIRMATION

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.

;