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

Row change on GDBG

Hi, I need to do some validation as soon user click on different row on a GDBD for the current row. If my validation passes then only I want focus should moved to other row. For example. User modifies some cells on 3rd row and as soon as user clicks on 4th row I want to save the changes for 3rd row first. If every thing is fine then only I want focus to move on 4th row. How should I do it? Which event should I use? Please help.

3 Replies

AD Administrator Syncfusion Team April 29, 2005 12:25 PM

Try using the RowLeave event. Do your tests and if you can to cancel the leave, set e.Cancel = true.


AD Administrator Syncfusion Team May 4, 2005 07:12 PM

Thanks Clay, it did work. But it clears out the selection of current row. I need to keep the current row selected. How should I keep the current row selected? Please do reply! thanks VS


AD Administrator Syncfusion Team May 4, 2005 07:44 PM

Try handling the ValidatedFailed event and selecting the row there. private void gridDataBoundGrid1_ValidateFailed(object sender, GridValidateFailedEventArgs e) { this.gridDataBoundGrid1.Selections.SelectRange(GridRangeInfo.Row(gridDataBoundGrid1.CurrentCell.RowIndex), true); }

Loader.
Live Chat Icon For mobile
Up arrow icon