Back to Devexpress

Edit Modes

aspnetmvc-16139-components-grid-view-data-editing-and-validation-edit-modes.md

latest1.3 KB
Original Source

Edit Modes

  • Feb 02, 2023
  • 2 minutes to read

The ASP.NET MVC GridView extension provides five built-in edit modes that allow end-users to edit grid data. Use the ASPxGridViewEditingSettings.Mode (via GridViewSettings.SettingsEditing .Mode ) property to specify the grid edit mode.

  • Edit Form

  • Edit Form and Display Row

  • Popup Edit Form

  • In-Line Editing

  • Batch

Example

The code sample below demonstrates how to specify the edit mode for the ASP.NET MVC GridView extension.

Partial View code:

cshtml
@Html.DevExpress().GridView(settings =>
{
    settings.Name = "myGridView";
    settings.CallbackRouteValues = new { Controller = "Home", Action = "GridViewPartial" };

    // Define the edit mode.
    settings.SettingsEditing.Mode = GridViewEditingMode.EditFormAndDisplayRow;
    // ... 
}).Bind(Model).GetHtml()

See Also

Data Editing

Batch Edit

Edit Cells