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
and Cancel
- Save or discard changes by clicking the toolbar update and cancel button respectively.Order ID | Customer Name | Freight | Order Date | Ship Country |
---|---|---|---|---|
10248 | Paul Henriot | $32.38 | 7/4/1996 | France |
10249 | Karin Josephs | $11.61 | 7/5/1996 | Germany |
10250 | Mario Pontes | $65.83 | 7/8/1996 | Brazil |
10251 | Mary Saveley | $41.34 | 7/8/1996 | France |
10252 | Pascale Cartrain | $51.30 | 7/9/1996 | Belgium |
10253 | Mario Pontes | $58.17 | 7/10/1996 | Brazil |
10254 | Yang Wang | $22.98 | 7/11/1996 | Switzerland |
10255 | Michael Holz | $148.33 | 7/12/1996 | Switzerland |
10256 | Paula Parente | $13.97 | 7/15/1996 | Brazil |
10257 | Carlos Hernández | $81.91 | 7/16/1996 | Venezuela |
10258 | Roland Mendel | $140.51 | 7/17/1996 | Austria |
10259 | Francisco Chang | $3.25 | 7/18/1996 | Mexico |
Grid supports CRUD operations and they can be configured using
editSettings
. 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
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
method.
Injecting Module:
Grid features are separated into feature-wise modules. To use the editing feature, inject the
Edit
module into the services
.
More information on the batch editing can be found in this documentation section.