The DevExpress ASP.NET MVC Data Grid (GridView) control allows you to edit and update multiple grid rows on the client side and send them to the server in a single request.
Set the SettingsEditing.Mode property to 'Batch' to enable batch edit mode. In this mode, an end user uses in-line editors to edit grid data. The grid highlights the modified cells in green and deleted rows in gray. This grid also displays the "Recover" button for deleted rows. To hide the deleted rows, set the SettingsEditing.BatchEditSettings.HighlightDeletedRows property to false.
If a grid contains modified data, it displays a confirmation message before a grid performs a postback or a callback. The KeepChangesOnCallbacks property specifies whether the grid supports callbacks and allows you to use the 'Preview changes' button to preview and modify inserted, deleted and edited rows before you click 'Update'.
You can use the following properties to customize the batch edit mode settings:
- The EditMode - Specifies which control element (data cell or data row) end users can use to edit data (the "Edit mode" combo box).
- The StartEditAction - Specifies which action invokes a data cell's in-line editor (the "Start edit action" combo box).
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
The source code files for this demo are installed (by default) in the following directory:
Open CS Solution
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxGridViewDemos