Batch updates with GridView

Discussion in 'ASP .Net' started by McGeeky, May 9, 2007.

  1. McGeeky

    McGeeky Guest

    Hi. GridView's inbuilt capability to edit/update individual rows, one at a
    time, is useful but inadequate for a scenario we currently face. I want the
    user to be able to change values in multiple rows of the GridView and then
    hit an "OK" button which then applies all the changes together as a single
    unit. I also need the GridView to support paging; such that a user makes a
    change in one page, navigates to another, nagivates back again and finds
    that their original edit is still preserved, yet, not commited to the
    database. Only when they hit "OK" will their changes on each of the GridView
    pages be committed.

    Are there any examples available that demonstrate this capability? I have
    made a good start but would like to base my work on something already
    proven. Challenges I currently face are; where to store the edits that the
    user has made (in view state/code behind/session state), in what form to
    store those edits (in a table class, an array etc.). I have figured out I
    need to use a template column to show edit boxes on GridView. But another
    challenge is then referencing the values in those edit boxes in the code
    behind. Also, where to store the IDs of the rows, in hidden text boxes?

    Any help/pointers much appreciated!!!!

    --
    McGeeky
    http://mcgeeky.blogspot.com
     
    McGeeky, May 9, 2007
    #1
    1. Advertisements

  2. McGeeky

    bruce barker Guest

    load a dataset with the data and store in session. then bind/page the
    gridview to the dataset. when the user hit ok, use an adapter to update
    the database from the dataset. lots of examples of using disconnected
    datasets.

    -- bruce (sqlwork.com)

    McGeeky wrote:
    > Hi. GridView's inbuilt capability to edit/update individual rows, one at a
    > time, is useful but inadequate for a scenario we currently face. I want the
    > user to be able to change values in multiple rows of the GridView and then
    > hit an "OK" button which then applies all the changes together as a single
    > unit. I also need the GridView to support paging; such that a user makes a
    > change in one page, navigates to another, nagivates back again and finds
    > that their original edit is still preserved, yet, not commited to the
    > database. Only when they hit "OK" will their changes on each of the GridView
    > pages be committed.
    >
    > Are there any examples available that demonstrate this capability? I have
    > made a good start but would like to base my work on something already
    > proven. Challenges I currently face are; where to store the edits that the
    > user has made (in view state/code behind/session state), in what form to
    > store those edits (in a table class, an array etc.). I have figured out I
    > need to use a template column to show edit boxes on GridView. But another
    > challenge is then referencing the values in those edit boxes in the code
    > behind. Also, where to store the IDs of the rows, in hidden text boxes?
    >
    > Any help/pointers much appreciated!!!!
    >
    > --
    > McGeeky
    > http://mcgeeky.blogspot.com
    >
    >
    >
     
    bruce barker, May 10, 2007
    #2
    1. Advertisements

  3. McGeeky

    McGeeky Guest

    Thanks so much for that.

    --
    McGeeky
    http://mcgeeky.blogspot.com


    "bruce barker" <> wrote in message
    news:...
    > load a dataset with the data and store in session. then bind/page the
    > gridview to the dataset. when the user hit ok, use an adapter to update
    > the database from the dataset. lots of examples of using disconnected
    > datasets.
    >
    > -- bruce (sqlwork.com)
    >
    > McGeeky wrote:
    > > Hi. GridView's inbuilt capability to edit/update individual rows, one at

    a
    > > time, is useful but inadequate for a scenario we currently face. I want

    the
    > > user to be able to change values in multiple rows of the GridView and

    then
    > > hit an "OK" button which then applies all the changes together as a

    single
    > > unit. I also need the GridView to support paging; such that a user makes

    a
    > > change in one page, navigates to another, nagivates back again and finds
    > > that their original edit is still preserved, yet, not commited to the
    > > database. Only when they hit "OK" will their changes on each of the

    GridView
    > > pages be committed.
    > >
    > > Are there any examples available that demonstrate this capability? I

    have
    > > made a good start but would like to base my work on something already
    > > proven. Challenges I currently face are; where to store the edits that

    the
    > > user has made (in view state/code behind/session state), in what form to
    > > store those edits (in a table class, an array etc.). I have figured out

    I
    > > need to use a template column to show edit boxes on GridView. But

    another
    > > challenge is then referencing the values in those edit boxes in the code
    > > behind. Also, where to store the IDs of the rows, in hidden text boxes?
    > >
    > > Any help/pointers much appreciated!!!!
    > >
    > > --
    > > McGeeky
    > > http://mcgeeky.blogspot.com
    > >
    > >
    > >
     
    McGeeky, May 10, 2007
    #3
  4. McGeeky

    AG Guest

    Check out this project. It contains a bulk edit gridview.
    http://www.codeplex.com/ASPNetRealWorldContr


    --

    AG
    Email: discuss at adhdata dot com



    "McGeeky" <> wrote in message
    news:%...
    > Hi. GridView's inbuilt capability to edit/update individual rows, one at a
    > time, is useful but inadequate for a scenario we currently face. I want
    > the
    > user to be able to change values in multiple rows of the GridView and then
    > hit an "OK" button which then applies all the changes together as a single
    > unit. I also need the GridView to support paging; such that a user makes a
    > change in one page, navigates to another, nagivates back again and finds
    > that their original edit is still preserved, yet, not commited to the
    > database. Only when they hit "OK" will their changes on each of the
    > GridView
    > pages be committed.
    >
    > Are there any examples available that demonstrate this capability? I have
    > made a good start but would like to base my work on something already
    > proven. Challenges I currently face are; where to store the edits that the
    > user has made (in view state/code behind/session state), in what form to
    > store those edits (in a table class, an array etc.). I have figured out I
    > need to use a template column to show edit boxes on GridView. But another
    > challenge is then referencing the values in those edit boxes in the code
    > behind. Also, where to store the IDs of the rows, in hidden text boxes?
    >
    > Any help/pointers much appreciated!!!!
    >
    > --
    > McGeeky
    > http://mcgeeky.blogspot.com
    >
    >
    >
     
    AG, May 10, 2007
    #4
  5. McGeeky

    McGeeky Guest

    Thanks!

    --
    McGeeky
    http://mcgeeky.blogspot.com


    "AG" <> wrote in message
    news:#...
    > Check out this project. It contains a bulk edit gridview.
    > http://www.codeplex.com/ASPNetRealWorldContr
    >
    >
    > --
    >
    > AG
    > Email: discuss at adhdata dot com
    >
    >
    >
    > "McGeeky" <> wrote in message
    > news:%...
    > > Hi. GridView's inbuilt capability to edit/update individual rows, one at

    a
    > > time, is useful but inadequate for a scenario we currently face. I want
    > > the
    > > user to be able to change values in multiple rows of the GridView and

    then
    > > hit an "OK" button which then applies all the changes together as a

    single
    > > unit. I also need the GridView to support paging; such that a user makes

    a
    > > change in one page, navigates to another, nagivates back again and finds
    > > that their original edit is still preserved, yet, not commited to the
    > > database. Only when they hit "OK" will their changes on each of the
    > > GridView
    > > pages be committed.
    > >
    > > Are there any examples available that demonstrate this capability? I

    have
    > > made a good start but would like to base my work on something already
    > > proven. Challenges I currently face are; where to store the edits that

    the
    > > user has made (in view state/code behind/session state), in what form to
    > > store those edits (in a table class, an array etc.). I have figured out

    I
    > > need to use a template column to show edit boxes on GridView. But

    another
    > > challenge is then referencing the values in those edit boxes in the code
    > > behind. Also, where to store the IDs of the rows, in hidden text boxes?
    > >
    > > Any help/pointers much appreciated!!!!
    > >
    > > --
    > > McGeeky
    > > http://mcgeeky.blogspot.com
    > >
    > >
    > >

    >
    >
     
    McGeeky, May 11, 2007
    #5
  6. McGeeky

    McGeeky Guest

    Strange... there is no way to download the source code for it.

    --
    McGeeky
    http://mcgeeky.blogspot.com


    "McGeeky" <> wrote in message
    news:...
    > Thanks!
    >
    > --
    > McGeeky
    > http://mcgeeky.blogspot.com
    >
    >
    > "AG" <> wrote in message
    > news:#...
    > > Check out this project. It contains a bulk edit gridview.
    > > http://www.codeplex.com/ASPNetRealWorldContr
    > >
    > >
    > > --
    > >
    > > AG
    > > Email: discuss at adhdata dot com
    > >
    > >
    > >
    > > "McGeeky" <> wrote in message
    > > news:%...
    > > > Hi. GridView's inbuilt capability to edit/update individual rows, one

    at
    > a
    > > > time, is useful but inadequate for a scenario we currently face. I

    want
    > > > the
    > > > user to be able to change values in multiple rows of the GridView and

    > then
    > > > hit an "OK" button which then applies all the changes together as a

    > single
    > > > unit. I also need the GridView to support paging; such that a user

    makes
    > a
    > > > change in one page, navigates to another, nagivates back again and

    finds
    > > > that their original edit is still preserved, yet, not commited to the
    > > > database. Only when they hit "OK" will their changes on each of the
    > > > GridView
    > > > pages be committed.
    > > >
    > > > Are there any examples available that demonstrate this capability? I

    > have
    > > > made a good start but would like to base my work on something already
    > > > proven. Challenges I currently face are; where to store the edits that

    > the
    > > > user has made (in view state/code behind/session state), in what form

    to
    > > > store those edits (in a table class, an array etc.). I have figured

    out
    > I
    > > > need to use a template column to show edit boxes on GridView. But

    > another
    > > > challenge is then referencing the values in those edit boxes in the

    code
    > > > behind. Also, where to store the IDs of the rows, in hidden text

    boxes?
    > > >
    > > > Any help/pointers much appreciated!!!!
    > > >
    > > > --
    > > > McGeeky
    > > > http://mcgeeky.blogspot.com
    > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    McGeeky, May 11, 2007
    #6
  7. McGeeky

    AG Guest

    I know and have posted that fact several times there, but no one replies.
    However, you can download the dll from the Releases tab and it works.
    I think I had a problem with the naming of the dll vs the reference, but
    once I fixed that, it worked fine.

    Here is the link to where I originally found out about it.
    http://blogs.msdn.com/mattdotson/articles/490868.aspx

    --

    AG
    Email: discuss at adhdata dot com



    "McGeeky" <> wrote in message
    news:eQiS$...
    > Strange... there is no way to download the source code for it.
    >
    > --
    > McGeeky
    > http://mcgeeky.blogspot.com
    >
    >
    > "McGeeky" <> wrote in message
    > news:...
    >> Thanks!
    >>
    >> --
    >> McGeeky
    >> http://mcgeeky.blogspot.com
    >>
    >>
    >> "AG" <> wrote in message
    >> news:#...
    >> > Check out this project. It contains a bulk edit gridview.
    >> > http://www.codeplex.com/ASPNetRealWorldContr
    >> >
    >> >
    >> > --
    >> >
    >> > AG
    >> > Email: discuss at adhdata dot com
    >> >
    >> >
    >> >
    >> > "McGeeky" <> wrote in message
    >> > news:%...
    >> > > Hi. GridView's inbuilt capability to edit/update individual rows, one

    > at
    >> a
    >> > > time, is useful but inadequate for a scenario we currently face. I

    > want
    >> > > the
    >> > > user to be able to change values in multiple rows of the GridView and

    >> then
    >> > > hit an "OK" button which then applies all the changes together as a

    >> single
    >> > > unit. I also need the GridView to support paging; such that a user

    > makes
    >> a
    >> > > change in one page, navigates to another, nagivates back again and

    > finds
    >> > > that their original edit is still preserved, yet, not commited to the
    >> > > database. Only when they hit "OK" will their changes on each of the
    >> > > GridView
    >> > > pages be committed.
    >> > >
    >> > > Are there any examples available that demonstrate this capability? I

    >> have
    >> > > made a good start but would like to base my work on something already
    >> > > proven. Challenges I currently face are; where to store the edits
    >> > > that

    >> the
    >> > > user has made (in view state/code behind/session state), in what form

    > to
    >> > > store those edits (in a table class, an array etc.). I have figured

    > out
    >> I
    >> > > need to use a template column to show edit boxes on GridView. But

    >> another
    >> > > challenge is then referencing the values in those edit boxes in the

    > code
    >> > > behind. Also, where to store the IDs of the rows, in hidden text

    > boxes?
    >> > >
    >> > > Any help/pointers much appreciated!!!!
    >> > >
    >> > > --
    >> > > McGeeky
    >> > > http://mcgeeky.blogspot.com
    >> > >
    >> > >
    >> > >
    >> >
    >> >

    >>
    >>

    >
    >
     
    AG, May 11, 2007
    #7
    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. Replies:
    2
    Views:
    3,891
    Jared
    Jun 23, 2006
  2. rockdale

    Batch update in gridview?

    rockdale, Sep 12, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    2,036
    rockdale
    Sep 12, 2006
  3. Dimitris Milonas

    User Interface and Batch Inserts/Updates

    Dimitris Milonas, Nov 25, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    307
    Dimitris Milonas
    Nov 25, 2007
  4. rbrowning1958

    Batch Updates from a Grid

    rbrowning1958, Apr 12, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    382
    rbrowning1958
    Apr 13, 2008
  5. Replies:
    16
    Views:
    201
    Richard Maher
    Mar 25, 2007
Loading...

Share This Page