editing

Contains options that specify how grid content can be changed.

Type:

Object

dxDataGrid supports editing, insertion and the removing of grid values. The availability of performing a certain operation is specified by the editEnabled, insertEnabled and removeEnabled options.

Editing in dxDataGrid can be performed in two different modes: row and batch. In the row mode, all changes made in grid rows are reflected in the data source immediately after editing completes. In the batch mode, changes are buffered before being transmitted to the data source. The user sends them manually once he or she finishes editing.

See Also
  • For more information about editing settings you can configure, including both edit modes, refer to the Editing in UI topic.
  • To discover how to manage the editing process from code, see the Editing in Code topic.
NOTE
Before allowing a user to edit, insert and remove, make sure your data source supports all these actions.

View Demo

Show Example:
jQuery

In this example, you can perform all kinds of data modifications available in the dxDataGrid widget: row editing, insertion and removal. These operations are conducted in the batch edit mode. All these settings are specified using the fields of the editing configuration object.


                                    

                                    

editEnabled

Specifies whether or not grid records can be edited at runtime.

Type:

Boolean

Default Value: false

Show Example:
jQuery

In this example, you can change the value of the editEnabled option at runtime using the check box below. If this option is true, the grid is supplied with an additional column that contains "Edit" buttons enabling you to edit grid records. Otherwise, this column is hidden, and the grid records cannot be edited.


                                    

                                    

editMode

Specifies how grid values can be edited manually.

Type:

String

Default Value: "row"
Accepted Values: "row" | "batch" | "cell"

Editing grid values requires the editEnabled option to be set to true.

For a comprehensive overview of available edit modes, refer to the Row Mode, Batch Mode and Cell Mode articles.

View Demo

Show Example:
jQuery

In this example, you can try all edit modes presented in the dxDataGrid widget. To change the current edit mode, choose the required item from the drop-down menu under the grid.


                                    

                                    

insertEnabled

Specifies whether or not new records can be inserted into a grid.

Type:

Boolean

Default Value: false

Show Example:
jQuery

In this example, you can change the value of the insertEnabled option at runtime using the check box below. If this option is true, the grid is supplied with a button that inserts a new record into the grid. Otherwise, this button is hidden, and you cannot insert records into the grid.


                                    

                                    

removeEnabled

Specifies whether or not records can be deleted from a grid.

Type:

Boolean

Default Value: false

Show Example:
jQuery

In this example, you can change the value of the removeEnabled option at runtime using the check box below. If this option is true, the grid is supplied with an additional column that contains "Delete" buttons enabling you to delete grid records. Otherwise, this column is hidden, and the grid records cannot be deleted.


                                    

                                    

texts

Contains options that specify texts for editing-related grid controls.

Type:

Object

For detailed information on editing-related grid controls, see the Data Modification Controls topic.

Show Example:
jQuery

In this example, several options of the editing | texts configuration object are changed.