views:

28

answers:

1

i have a gridview,two buttons(edit,save) ,what i wanna to do is :

when click edit open the gridview in edit mode for all the textboxes.

when click save takes the changes and update

(rather than edit and update row by row)

i use object data source.

+2  A: 

A GridView is not really ment to edit all rows at once. To do so it's actually not that straight forward. If you want to do it though, check out the following article:

Real World GridView: Bulk Editing

I would recommend not using a GridView and using a Repeater to show your data. Then when you want to edit, use a different page (or a panel with a different Repeater) to display your edit controls. Your code will be a lot more maintainable with this solution.

You didn't explain why you need to edit all rows at once so either way one of the above solutions should work.

Kelsey
i wanna to update more than record in the DB by one click(just for simplification for the end user).. this will be like when i put set of check boxes in th gridview and when the user select more than one item click Delete button at the end of selection to delete all selected items. i think this is the same idea.if u have any ideas i will be glad to hear.