Edit Data

  • 2 minutes to read

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

Edit Form

Allows users to edit cell values in the Edit Form when they click the Edit button. Each edit cell corresponds to a data column and permits its value to be edited.

EditMode_EditForm

Edit Form and Display Row

This mode is similar to Edit Form mode, but it displays the currently selected row above the edit form.

EditMode_EditFormAndDisplay

Popup Edit Form

Allows users 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.

Popupeditform_editmode

In-Line Editing

Allows users to edit cell values in the in-line edit row when they click the Edit button. Users can modify the value directly within the cell.

EditMode_Inline

Batch

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

EditMode_Batch

You can allow users to manipulate data in the edit modes mentioned above (except for Batch edit mode). To do this, add a command column to the ASPxGridView.Columns collection, and specify which commands they can use. To switch ASPxGridView to edit mode, users can click the Edit command. You can also use the ASPxGridView.StartEdit method to switch to edit mode programmatically. To switch ASPxGridView back to browse mode and save all 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 from being edited, deleted, or inserted. To do this, use the ASPxGridDataSecuritySettings.AllowEdit, ASPxGridDataSecuritySettings.AllowDelete, and ASPxGridDataSecuritySettings.AllowInsert properties, respectively.

Note

Specify the ASPxGridBase.KeyFieldName property to enable data edit, insertion, and deletion operations.

Concepts

Task-Based Help

See Also