editing

Contains options that specify how grid content can be changed.

Type: Object

DataGrid supports editing, insertion and the removing of grid values. The availability of performing a certain operation is specified by the allowUpdating, allowAdding and allowDeleting options.

Editing in DataGrid can be performed in four different modes. For a comprehensive overview of them, see the Row Mode, Batch Mode, Cell Mode and Form Mode articles.

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:
AngularJS
Knockout
jQuery

In this example, you can perform all kinds of data modifications available in the DataGrid 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.


                                    

                                    

In this example, you can perform all kinds of data modifications available in the DataGrid 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.


                                    

                                    

In this example, you can perform all kinds of data modifications available in the DataGrid 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.


                                    

                                    

allowAdding

Specifies whether or not new grid records can be added at runtime.

Type: Boolean
Default Value: false

Show Example:
AngularJS
Knockout
jQuery

In this example, you can change the value of the allowAdding 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.


                                    

                                    

In this example, you can change the value of the allowAdding 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.


                                    

                                    

In this example, you can change the value of the allowAdding 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.


                                    

                                    

allowDeleting

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

Type: Boolean
Default Value: false

Show Example:
AngularJS
Knockout
jQuery

In this example, you can change the value of the allowDeleting 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.


                                    

                                    

In this example, you can change the value of the allowDeleting 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.


                                    

                                    

In this example, you can change the value of the allowDeleting 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.


                                    

                                    

allowUpdating

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

Type: Boolean
Default Value: false

Show Example:
AngularJS
Knockout
jQuery

In this example, you can change the value of the allowUpdating 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.


                                    

                                    

In this example, you can change the value of the allowUpdating 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.


                                    

                                    

In this example, you can change the value of the allowUpdating 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.


                                    

                                    

editEnabled

Deprecated

Use the allowUpdating option instead.

editMode

Deprecated

Use the mode option instead.

form

The form configuration object. Used only when the editing mode is "form".

Type: Form options

Use the dataField option to link a form item with the corresponding grid column.

NOTE: There is a number of Form properties that you cannot specify using this option. Those are the following.

insertEnabled

Deprecated

Use the allowAdding option instead.

mode

Specifies how grid values can be edited manually.

Type: String
Default Value: 'row'
Accepted Values: 'row' | 'batch' | 'cell' | 'form'

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

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

View Demo

Show Example:
AngularJS
Knockout
jQuery

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


                                    

                                    

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


                                    

                                    

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


                                    

                                    

removeEnabled

Deprecated

Use the allowDeleting option instead.

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:
AngularJS
Knockout
jQuery

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


                                    

                                    

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


                                    

                                    

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