Back to Devexpress

Batch Edit Mode

aspnetmvc-115113-components-card-view-data-editing-and-validation-batch-edit-mode.md

latest3.7 KB
Original Source

Batch Edit Mode

  • Jul 15, 2024
  • 5 minutes to read

The ASP.NET MVC CardView extension allows you to perform batch editing operations of CardView 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 CardView. It also provides an overview of batch editing, as well as its limitations.

Overview

In batch editing mode, you can edit the CardView data contained on a page using in-line editors. All user changes are maintained on the client side before the user clicks the Save changes button. To cancel all changes, click the Cancel changes button.

Note

Since data modification is performed on the client side in batch edit mode, the server-side ASPxCardView.StartEdit (via MVCxCardView .StartEdit ) and ASPxCardView.AddNewCard (via MVCxCardView .AddNewCard ) methods are not in effect. Additionally, the client-side ASPxClientCardView.AddNewCard (via MVCxClientCardView .AddNewCard ) method does not perform a callback.

The CardViewBatchEditSettings.EditMode (via CardViewSettings.SettingsEditing .BatchEditSettings.EditMode ) property allows you to specify which control element ( Cell or Card ) is used to edit the data.

Enabling Batch Data Editing in the CardView

You can enable batch editing operations within the CardView in the following way.

  1. 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.

  2. Define the callback route values within the PartialView.

  3. Enable the command layout item and command buttons.

Appearance Customization

You can customize the visual presentation of modified data items using the following settings, available through the CardViewSettings.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.

Batch Edit Mode Limitations

See Also

Card View