GridView Update mystery

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David C

    GridView Update mystery

    I have a GridView tied to a SqlDataSource (table) with a PrimaryKey named
    ID. When I click the UPDATE link button, the postback happens but nothing
    changes. I put a comment in the Updated event of the SqlDataSource and the
    comment shows.
    I even checked the DataKeyNames on the GridView and that is set to the "ID"
    column.
    Can anyone tell me where else I might look to find out why the update is not
    happening? I am doing this same thing in several other pages and they work
    fine. Thanks.

    David


  • Alexey Smirnov

    #2
    Re: GridView Update mystery

    On Aug 5, 9:26 pm, "David C" <dlch...@lifeti meinc.comwrote:
    I have a GridView tied to a SqlDataSource (table) with a PrimaryKey named
    ID.  When I click the UPDATE link button, the postback happens but nothing
    changes.  I put a comment in the Updated event of the SqlDataSource andthe
    comment shows.
    I even checked the DataKeyNames on the GridView and that is set to the "ID"
    column.
    Can anyone tell me where else I might look to find out why the update is not
    happening?  I am doing this same thing in several other pages and they work
    fine.  Thanks.
    >
    David
    Hi David,

    did you check what values you update? Perhaps, you rebuild your grid
    in the Page_Load method before the update proceeded.

    Comment

    • David C

      #3
      Re: GridView Update mystery

      Yup...that was it. Thanks.

      David
      "Alexey Smirnov" <alexey.smirnov @gmail.comwrote in message
      news:4e1735b9-32dd-4480-9d37-5958327052c9@79 g2000hsk.google groups.com...
      On Aug 5, 9:26 pm, "David C" <dlch...@lifeti meinc.comwrote:
      I have a GridView tied to a SqlDataSource (table) with a PrimaryKey named
      ID. When I click the UPDATE link button, the postback happens but nothing
      changes. I put a comment in the Updated event of the SqlDataSource and the
      comment shows.
      I even checked the DataKeyNames on the GridView and that is set to the
      "ID"
      column.
      Can anyone tell me where else I might look to find out why the update is
      not
      happening? I am doing this same thing in several other pages and they work
      fine. Thanks.
      >
      David
      Hi David,

      did you check what values you update? Perhaps, you rebuild your grid
      in the Page_Load method before the update proceeded.


      Comment

      Working...