Saturday, March 24, 2012

Validation in DetailsView

Hi,

I have a web form that has DetailsView. When editing or inserting, there is a dropdownlist for user to select a "Device". Depending the selected value of "Device", there are 3 types of validation groups. Now my challenge is how can i assigned the correct group so that the web form validates the fields (about 15 items) based on the "Device" chosen. I have tried various methods but no success in referencing theCommandField's "Update" 's propertiesValidation Group. I have tried to convert the CommandField to ItemTemplate but without any success too. Any suggestion will be very thankful.
Cheers
Inspire

I'm not sure if I follow you exactly, but if you want to perform conditional validation (based on another value) why don't you use a custom validator control?
You could make all kinds of different validations there.

No comments:

Post a Comment