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

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

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.

Loader.
Live Chat Icon For mobile
Up arrow icon