Question Gridview validation - almost perfect - but not quite

guybuk

New member
Joined
Jun 17, 2010
Messages
1
Programming Experience
5-10
Hi

This is a vb (2008) asp site.

I'm using validators in a gridview control. The columns have been converted to templates and, when editing the data the validation works as expected.

However, when the gridview first goes into Edit mode, even if the existing data fails validation, the validators don't highlight the errors UNTIL the data has been manually edited and the field loses focus. Only then do the validators correctly show the validation errors.

How can I programatically force the validators to check the validation and display their messages when the gridview is first displayed, before the data is edited ?

Note : The validators are warning the user about business rules, not database limitations, so it's possible that data from the database can still fail validation. If this happens, is it possible to switch off validation to allow an illeagal record to be saved anyway ?

Cheers - G
 

Latest posts

Back
Top