Update without using Edit and Update button

Discussion in 'ASP .Net Datagrid Control' started by Henke, May 30, 2006.

  1. Henke

    Henke Guest

    I use a GridView on a page to display data that I'd like to update.
    Is it possible to update the data in the db without using the Edit and
    Update buttons.
    I'd like to have one button on the page that I can press when all data is
    updated. To be able to change the data in a cell I remove the Label in the
    ItemTemplate and replaces it with a TextBox.
    Thanks in advance!
    /Henke
     
    Henke, May 30, 2006
    #1
    1. Advertising

  2. Henke

    Brock Allen Guest

    The GridView lends itself to only editing one row at a time. But there is
    an UpdateRow API on the GridView to manually update a specific row. You'd
    have to have a button on your form call this for each row index you'd like
    to be updated. I've not tried this approach myself, so not sure if there
    are any internal checks that would prohibit this since the rows won't be
    in edit mode. Also, keep in mind that given that the GridView is only designed
    to edit one row at a time you're going to make N round trips to the data
    base for N number of rows you want to update.

    -Brock
    http://staff.develop.com/ballen


    > I use a GridView on a page to display data that I'd like to update.
    > Is it possible to update the data in the db without using the Edit and
    > Update buttons.
    > I'd like to have one button on the page that I can press when all data
    > is
    > updated. To be able to change the data in a cell I remove the Label in
    > the
    > ItemTemplate and replaces it with a TextBox.
    > Thanks in advance!
    > /Henke
     
    Brock Allen, Jun 1, 2006
    #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. Hartmut Schroth
    Replies:
    3
    Views:
    3,506
    Hartmut Schroth
    Dec 1, 2003
  2. Randall Parker
    Replies:
    1
    Views:
    464
    Sanjeevakumar Hiremath
    Oct 31, 2005
  3. Frank Kurka
    Replies:
    8
    Views:
    312
  4. Marco Liedekerken
    Replies:
    0
    Views:
    1,057
    Marco Liedekerken
    Nov 8, 2006
  5. Replies:
    0
    Views:
    213
Loading...

Share This Page