views:

648

answers:

5

What is the best way to achieve bulk editing of a grid view in ASP.net? I don't want the user to have to click edit on each individual row to change it. It would be much better if they could make all the changes and then submit them in one go.

What I want is something like


Item1 x x x x

Item2 x x x x

Item3 x x x x

Submit


Where x a check box.

Is a grid view even a good way to go about achieving this?

A: 

You should be able to set the GridViewRow.RowState to Edit during RowDataBound. Just be sure the RowType is DataRow.

Jeremy
A: 

I wonder if Matt Berseth´s post about bulk inserting (in a listview but it might help you) could be of some assistance, try it:

http://mattberseth.com/blog/2008/05/bulk_inserting_data_with_the_l.html

Johan Leino
+2  A: 

Refer link below

Edit or update multiple records in GridView using CheckBox

+1  A: 

Try this:

In you gridview create a template column with textboxs next fill all with databinder for get default data from database. put a bottom your page and in this bottom create a for cycle that load all gridview rows and search for template column you created. Fin the textbox a write this to dataset. Next you can use my code i posted in this thread for with one line save all dataset.

pho3nix
A: 

BulkEditGridview from RealWorldGrids does just what you want.

roman m