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
close icon

How to set custom level validation rule for particular Column

Hi Help help ...!!! I am using GridDataBoundGrid control, I wanna apply custom validation rules for particular column. Is there any delegate I can hook to do my custom validation? The currenlty provided styleinfo.validatevalue object does not provide me sufficient information to do needful Please let me know is there any other way of doing this. I appreciate your help. thanks Nandkumar

3 Replies

AD Administrator Syncfusion Team September 12, 2005 10:48 PM UTC

To do validation on a cell, you can subscribe to the grid.CurrentCellValidating event. There, tiy can check grid.CurrentCell.Renderer.ControlText to see if it is valid. If not, you can set e.Cancel = true. You can use grid.CurrentCell.RowIndex\grid.CurrentCell.ColIndex to know what row/col you are in.


NA Nandkumar September 13, 2005 05:51 AM UTC

Hi Clay Burch, Thanks for the information. Just am wondering if any thing like, I can do by providing validation rule in XML file/string so that in future I can make changes with out re-compiling my source code. Thanks Nandkumar >To do validation on a cell, you can subscribe to the grid.CurrentCellValidating event. There, tiy can check grid.CurrentCell.Renderer.ControlText to see if it is valid. If not, you can set e.Cancel = true. You can use grid.CurrentCell.RowIndex\grid.CurrentCell.ColIndex to know what row/col you are in.


AD Administrator Syncfusion Team September 13, 2005 03:54 PM UTC

Hi Nandkumar, Currently we don''t have any features like this. Thanks, Jay N

Loader.
Live Chat Icon For mobile
Up arrow icon