Batch updates with GridView

M

McGeeky

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!!!!
 
B

bruce barker

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)
 
A

AG

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top