Skip to main content
A newer version of this page is available. .

Edit Data

  • 2 minutes to read

ASPxGridView provides five built-in edit modes that allow end-users to manipulate grid data. To specify one of these five modes, set the ASPxGridViewEditingSettings.Mode property to one of the following values.

  • Edit Form (ASPxGridViewEditFormEventArgs.EditForm) - Allows users to edit cell values in the Edit Form when the Edit button is clicked. Each edit cell corresponds to a data column and permits its value to be edited.


  • Edit Form and Display Row (GridViewEditingMode.EditFormAndDisplayRow) - This mode is similar to the Edit Form mode, but it displays the currently selected row above the edit form.


  • Popup Edit Form (GridViewEditingMode.PopupEditForm) - Allows user to edit cell values in the Popup Edit Form. In this mode, the ASPxGridView displays the edit cell in the Edit Form within the popup.


  • In-Line Editing (GridViewEditingMode.Inline) - Allows user to edit cell values in the In-Line edit row when the Edit button is clicked. This mode allows you to modify the value directly in the cell.


  • Batch (GridViewEditingMode.Batch) - Allows user to modify a batch of grid data on the client-side and to send it to the server in a single request. In this mode, the ASPxGridView maintains all user changes on the client side until a user saves or discards them.


To allow end-users to manipulate data in the edit modes mentioned above (except for the Batch edit mode), add a command column to the ASPxGridView.Columns collection, and specify which commands end-users can use. End-users can switch ASPxGridView to edit mode by clicking the Edit command. They can also use the ASPxGridView.StartEdit method to switch to edit mode programmatically. To switch ASPxGridView back to browse mode and to save all the changes, click the Update command or use the ASPxGridView.UpdateEdit method. To discard the changes, click the Cancel command or call the ASPxGridView.CancelEdit method.

You can prevent data edits, deletion and insertion using the ASPxGridDataSecuritySettings.AllowEdit, ASPxGridDataSecuritySettings.AllowDelete and ASPxGridDataSecuritySettings.AllowInsert properties, respectively.


To enable data edits, insertion and deletion operations, specify the ASPxGridBase.KeyFieldName property.


Task-Based Help

See Also