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

How to validate datarow

Hi,all Syncfusion has provided an interesting control,espeicially its Datagrid. I''m now testing it. Could it validate a datarow before the cursor jumps to the next/new line? If the validation fails, the cursor should stay where it was. I know how to validate a datacolumn. But if the user inputs some fields in a new datarow and avoid others fields in this row. Not all the fields'' datacolumn Changing event will triger. So it''s unacceptalbe to validate a row by validating all the fields in the row. thx.

5 Replies

AD Administrator Syncfusion Team December 10, 2004 02:41 AM

You can subscribe to the RowLeave event . There do your row level validation. If it fails, set e.Cancel = true.


VR Vlad Romanchik September 9, 2005 03:15 PM

I need to do validation of new records but only in the GridGroupingControl. Which events can I use to cancel addition of a the record if it fails validation. >You can subscribe to the RowLeave event . There do your row level validation. If it fails, set e.Cancel = true.


AD Administrator Syncfusion Team September 12, 2005 06:41 AM

Hi Vlad, You can make use of the following 2 events . 1) CurrentRecordContextChange 2) CurrentCellValidating But I would prefer "CurrentRecordContextChange" as it has more options and it can also stop from moving the current record, if it finds invalid data. In the sample attached, I implemented the both and commented the one at a time. Best Regards Mouli.


AD Administrator Syncfusion Team September 12, 2005 06:42 AM

Hi Vlad, You can make use of the following 2 events . 1) CurrentRecordContextChange 2) CurrentCellValidating But I would prefer "CurrentRecordContextChange" as it has more options and it can also stop from moving the current record, if it finds invalid data. In the sample attached, I implemented the both and commented the one at a time. Best Regards Mouli.


AD Administrator Syncfusion Team September 12, 2005 06:43 AM


Loader.
Live Chat Icon For mobile
Up arrow icon