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

Grid Validation

Hello I have a GridDataBoundGrid on a tabcontrol..which is bound to a datatable.. some columns of the datatable are set to AllowDBNull=false. so when i move on to a new row without entering the values.. i get error message to enter the values the must required column. but when i move on to a diffrent tab without entering the value in must required column of the grid... it gives me the error message but moves on to the next tab and i get stuck in a loop of error messages as i now am on a different tab and grid now has a row that is in edit mode in which one of the required columns is not filled in. How to get around this.. i would like to cancel the edit of row when i move on to next tab of the tab control Thanks Gaja

1 Reply

AD Administrator Syncfusion Team October 25, 2004 04:39 PM UTC

You can try to catch the grid.Leave event. In that event, if grid.CurrentCell.IsEditing, try calling grid.Currentcell.CancelEdit and grid.Binder.CancelEdit.

Loader.
Up arrow icon