DataList validation - only validate datalist on clicking "Update" or "Edit"

Hi,

I have a page with a datalist on it. The page has several other controls too. Users add/update items from datalist and enter data in textboxes etc.  The textboxes have validators. Also the datalist has a usercontrol with validators.

I want the user to be able to edit / update the items on datalist WITHOUT the whole page being validated.
With CausesValidation=True set for the Linkbuttons on datagrid, the whole page is validated ...this isn't what I want, users should be able to edit/delete the datalist items independent of other items on page / without having to input all the other inputs.

I have currently set CausesValidation=False so that users can edit/update the datalist without this failing because of other controls not validating. This means that the datalist is not validated of course though, and I want the datalist to be validated.

Thanks in advance for help.
rwallacejAsked:
Who is Participating?
 
bklmnshCommented:
You can define validation groups
http://www.dotnet-guide.com/validationgroups.html
0
 
bklmnshCommented:
MSDN article about validation groups:
http://msdn.microsoft.com/en-us/library/ms227424.aspx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.