GridView, CausesValidation

Discussion in 'ASP .Net Web Controls' started by WhiskeyRomeo, Sep 19, 2007.

  1. WhiskeyRomeo

    WhiskeyRomeo Guest

    I am working through a book on ASP.Net, I added a GridView and SQLDataSource.
    Everything worked as expected upon debugging. The rows were displayed with
    the Update and Delete buttons on each row. Upon pressing update button on a
    row, the row did go into edit mode. Changine a few fields and pressing
    Update
    resulted in nothing happening.

    In looking at the book's solution it has a entry for each command button as
    follows:

    CausesValidation="False"

    Adding this property to each command button results in the GridView working
    properly. It is as if this line should say AutoPostBack="True".

    If this property is required, why isn't automatically entered when dropping
    a GridView on the design surface?

    If you set CauseValidation="True", again the Update button does not cause a
    postback even if you turn the updatable columns into template columns and
    create a RequiredField validator for each.

    WR
     
    WhiskeyRomeo, Sep 19, 2007
    #1
    1. Advertising

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. Josh Anderson - remove Zs to reply

    CausesValidation not taking in Repeater control

    Josh Anderson - remove Zs to reply, Nov 20, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    380
    Josh Anderson - remove Zs to reply
    Nov 20, 2003
  2. George Durzi

    CausesValidation of editcommandcolumn

    George Durzi, Feb 12, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    980
    George Durzi
    Feb 12, 2004
  3. z. f.
    Replies:
    4
    Views:
    1,361
    z. f.
    Jun 23, 2004
  4. z. f.
    Replies:
    4
    Views:
    2,271
    Peter Blum
    Jun 25, 2004
  5. Martin
    Replies:
    3
    Views:
    781
    Peter Blum
    May 21, 2005
Loading...

Share This Page