Gridview Validation

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

  1. Guy_B

    Guy_B Guest

    Hi

    This is a vb (2008) asp.net 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
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Colin Mackay
    Replies:
    0
    Views:
    2,932
    Colin Mackay
    Jun 25, 2003
  2. Libs
    Replies:
    0
    Views:
    1,776
  3. Colin Basterfield

    Web form validation vs object validation

    Colin Basterfield, Nov 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    636
    Tommy
    Nov 29, 2003
  4. Matt
    Replies:
    14
    Views:
    4,588
    Chad Z. Hower aka Kudzu
    Jan 30, 2004
  5. Lucas Tam
    Replies:
    2
    Views:
    1,347
    Lucas Tam
    Feb 26, 2004
  6. =?Utf-8?B?ZGh1cndpdHo=?=
    Replies:
    1
    Views:
    679
    Teemu Keiski
    Apr 10, 2004
  7. =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?=

    Using Summary Validation control with server Custom validation

    =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?=, Oct 15, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,108
    =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?=
    Oct 15, 2004
  8. =?Utf-8?B?bWdvbnphbGVzMw==?=

    GridView Hierarchical View - Gridview in Gridview

    =?Utf-8?B?bWdvbnphbGVzMw==?=, May 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    18,346
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    May 9, 2006
Loading...