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.

How to validate datarow

Thread ID:

Created:

Updated:

Platform:

Replies:

22339 Dec 9,2004 11:03 PM Sep 12,2005 06:43 AM Windows Forms 5
loading
Tags: GridControl
Frank Lin
Asked On December 9, 2004 11:03 PM

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.

Administrator [Syncfusion]
Replied On 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.

Vlad Romanchik
Replied On 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.

Administrator [Syncfusion]
Replied On 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.

Administrator [Syncfusion]
Replied On 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.

Administrator [Syncfusion]
Replied On September 12, 2005 06:43 AM


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.

;