aspnetmvc-116311-components-vertical-grid-data-editing-and-validation-batch-editing.md
The ASP.NET MVC VerticalGrid extension allows you to modify a batch of grid data on the client side and send it to the server in a single request. This topic describes how to enable batch data editing operations within your VerticalGrid.
In batch editing mode, the grid data contained in a page can be edited using in-line editors. All user changes are maintained on the client side until the Save changes button is clicked, or all changes are canceled by clicking the Cancel changes button.
To prevent an end-user from editing row cells, set the row’s GridDataColumnSettings.ShowEditorInBatchEditMode property (using the MVCxVerticalGridRow .Settings.ShowEditorInBatchEditMode ) to false. In this case, the row cells cannot be switched to edit mode. When an end-user navigates through cells using the TAB key, the row’s cells are skipped.
If a grid contains modified data, it displays a “confirm” message before a grid callback is performed. You can customize the message text using the ASPxGridTextSettings.ConfirmOnLosingBatchChanges property (using VerticalGridSettings.SettingsText .ConfirmOnLosingBatchChanges ), or you can disable it by setting the GridBatchEditSettings.ShowConfirmOnLosingChanges property (using VerticalGridSettings.SettingsEditing .BatchEditSettings.ShowConfirmOnLosingChanges ) to false.
You can enable batch editing operations within the VerticalGrid using the following steps.
Add a controller action method that will implement the following data record operations: add new records , save updated records and delete existing records within a data source.
Define the callback route values within the PartialView.
Enable the command row and command items.
You can customize the visual presentation of modified data items using the following settings available through the VerticalGridSettings.Styles property.
The grid stores the Update and Cancel buttons within its status bar. Use the status bar ‘s style settings to control these buttons appearance.
The following code snippets illustrate how to hide the Update and Cancel buttons.
Using the ASPxGridSettings.ShowStatusBar property.
Modifying the grid’s dxvgStatusBar CSS class.