Is it possible to edit multiple records at a time in a ASP.Net datagrid??Data should come from Database in a grid and make some changes then update the records by a single command command button; Updated data should be stored back in the database.

Showing Answers 1 - 4 of 4 Answers

Amol

  • Mar 29th, 2006
 

The ItemCommand event is raised whenever any button associated with an item in the DataGrid is clicked.So we can have only one ItemCommand event handler in one datagrid.

Thus we can edit one records at a time.

Regards

Amol

  Was this answer useful?  Yes

sohail sayed

  • Mar 29th, 2006
 

Datagrid contains a property called as editItemIndex which specifies the index of the row that will be in the edit mode
U can point to one row at a time by specifying  the index of that row in EditItemIndex and hence u cannot edit more than one row at a time in a datagrid (U can always update multiple rows in the Database).
In case of deleteing however u can make a template column with checkbox and using an button(which is not in the Datagrid) delete all those rows that are checked.

  Was this answer useful?  Yes

binith

  • Jul 15th, 2006
 

yes thats right

it is possible to edit the entire data grid . but the thing is that u have to place a button control and write code to update table in the click event of button.

if u need the code for displaying datagrid with fully editable mode then check the link specified above

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions