ASP GridView All Rows In Edit Mode

asp.netgridview

In my ASP.NET page, I'm using a GridView to view data (Items & their prices). Currently users can edit the data (prices) in the grid row by row. (Click –> "Edit" link, change the values then "Update"). This is ROW by ROW. Is it possible to open all rows in Edit mode & use a single button (eg. Submit) to update all data once?

Best Answer

If you don't need to read only mode, in that case you can put input boxes ( textbox, dropdownlist, etc.) in ItemTEmplate section and bind them with existing data.

Next, put a submit button at above/below of the GridView and handle button Click event and loop through the GridView item data and save all database.

I'll post code block if you need. Thanks for your time.

Related Topic