Gridview Validation

Discussion in 'ASP .Net Web Controls' started by Guy_B, Jun 17, 2010.

  1. Guy_B

    Guy_B Guest


    This is a vb (2008) 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 ?

    btw: The validators are warning the user about business rules so it's
    possible that data from the database may fail validation.

    Cheers - G
    Guy_B, Jun 17, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.