Edit Data
- 3 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.
- Edit Form and Display Row
This mode is similar to Edit Form mode, but it displays the currently selected row above the edit form.
- 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.
- 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.
- 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.
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 ASPx
#Concepts
- Edit Form
- Batch Edit Mode
- Edit and Add Records
- Delete Records
- Validate Grid Data
- Process Custom Callbacks
#Task-Based Help
- 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
- How to conditionally make cell editors read-only
- How to implement a delete confirmation dialog with a “don’t ask me again” option