Example of Batch Editing in ASP.NET MVC Data Grid Control
This sample demonstrates CRUD operations in Grid. You can perform CRUD operations as follows,
Add
- To add a new record, click the add toolbar button.Edit
- To edit record, double-click a cell.Delete
- To delete record, click the toolbar delete button after selecting a row.Update
andCancel
- Save or discard changes by clicking the toolbar update and cancel button respectively.
Order ID | Customer Name | Freight | Order Date | Ship Country |
---|---|---|---|---|
10001 | ALFKI | $2.30 | 5/15/1991 | Denmark |
10002 | ANATR | $3.30 | 4/4/1990 | Brazil |
10003 | ANTON | $4.30 | 11/30/1957 | Germany |
10004 | BLONP | $5.30 | 10/22/1930 | Austria |
10005 | BOLID | $6.30 | 2/18/1953 | Switzerland |
10006 | ALFKI | $4.60 | 5/15/1991 | Denmark |
10007 | ANATR | $6.60 | 4/4/1990 | Brazil |
10008 | ANTON | $8.60 | 11/30/1957 | Germany |
10009 | BLONP | $10.60 | 10/22/1930 | Austria |
10010 | BOLID | $12.60 | 2/18/1953 | Switzerland |
10011 | ALFKI | $6.90 | 5/15/1991 | Denmark |
10012 | ANATR | $9.90 | 4/4/1990 | Brazil |
Grid supports CRUD operations and they can be configured using
editSettingsopens in a new tab
. It has the following modes to manipulate the datasource.
Normal
Dialog
Batch
In this demo, the Batch mode is enabled for editing by defining the
editSettings.mode
opens in a new tab
as batch
. You can start editing by double clicking a cell and changing the cell value.
The edited cell will be highlighted while navigating to a new cell.
You can bulk save the edited data to the datasource by clicking the toolbar's update
button or by externally
invoking the
batchSave
opens in a new tab
method.
More information on the batch editing can be found in this documentation sectionopens in a new tab.