- 2 min 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.
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.
- Edit Form
- Batch Edit Mode
- Edit and Add Records
- Delete Records
- Validate Grid Data
- Processing Custom Callbacks
- How to: Add and Initialize a New Row
- How to: Implement Data Editing When a Grid is Bound to a Table Created At Runtime
- How to: Save Changes and Switch to Browse Mode by Clicking ENTER
- How to: Delete Selected Rows