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.
RE: Is it possible to edit multiple records at a time ...
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.
RE: Is it possible to edit multiple records at a time ...
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.
RE: Is it possible to edit multiple records at a time ...
I'm new to .NET but upon researching something else happened to run across this about a week ago. According to this article it is possible. However, I have not yet tried this.
(Right after the Introduction there is a section called Making the entire datagrid editable).
RE: Is it possible to edit multiple records at a time ...
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