GridView & CauseValidation

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

  1. WhiskeyRomeo

    WhiskeyRomeo Guest

    I 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 is 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

  2. WhiskeyRomeo

    WhiskeyRomeo Guest

    Opps, I posted this in the wrong forum. I am going to post again in the
    correct forum.

    "WhiskeyRomeo" wrote:

    > I 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 is 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
    #2
    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. eitan
    Replies:
    0
    Views:
    555
    eitan
    Jun 4, 2005
  2. Nalaka

    GridView in a GridView

    Nalaka, Nov 11, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    6,628
    Nalaka
    Dec 5, 2005
  3. Replies:
    3
    Views:
    5,126
  4. =?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,009
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    May 9, 2006
  5. Q. John Chen

    ReportViewer Contral - CauseValidation ?

    Q. John Chen, Jan 23, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    350
    Q. John Chen
    Jan 23, 2007
Loading...

Share This Page