EditSettings
Represents the configuration options for enabling and customizing editing behavior in a grid component. This interface provides control over record-level operations such as adding, editing, and deleting, as well as customization of edit modes, confirmation dialogs, and integration of custom templates.
Props
The following table outlines the props for the EditSettings:
| Name | Type | Default | Description |
|---|---|---|---|
| allowAdd | boolean | false | Determines whether new records can be added to the grid.
When this property is set to true, new rows can be inserted either through programmatic methods
or by using toolbar 'Add' action. To enable this functionality, at least one column must be defined
as a primary key using the |
| allowBatchSave | boolean | false | Enables the buffered batch editing workflow for the grid.
This is the supported public opt-in flag for batch save/cancel behavior and
does not require using |
| allowBatchUndoRedo | boolean | false | Enables undo and redo of unsaved staged cell changes during batch editing.
When enabled, individual cell edits are recorded as separate undo actions while in batch editing mode,
allowing users to undo/redo staged changes before committing the batch. Each cell edit can be individually
reverted or reapplied without affecting the batch save workflow.
Only effective when |
| allowDelete | boolean | false | Determines whether records can be deleted from the grid. When this property is enabled, rows can be removed either programmatically or through toolbar 'Delete' action. Deletion operations require that at least one column is configured as a primary key. |
| allowEdit | boolean | false | Determines whether existing records in the grid can be edited.
When this property is set to true, users can modify cell values in existing rows either through
programmatic updates or via toolbar 'Edit' interaction. Editing requires that at least one column
is marked as a primary key using the |
| allowUndoRedo | boolean | false | Enables undo and redo functionality for grid editing operations.
When enabled, users can undo and redo edit, add, delete, paste, cut, autofill, and batch-save operations
through toolbar buttons, keyboard shortcuts (Ctrl+Z for undo, Ctrl+Y for redo), or programmatic API calls.
History is maintained up to the limit specified by |
| batchSaveLabel | string | 'Save' | Custom label applied to the public bulk-save action when batch editing is active. |
| confirmOnDelete | boolean | false | Controls whether a confirmation dialog is displayed before deleting a record. When enabled, users are prompted to confirm the deletion action to prevent accidental data loss. If disabled, records are deleted immediately without confirmation. |
| confirmOnEdit | boolean | true | Controls whether a confirmation dialog is displayed when saving or discarding changes. When enabled, the grid prompts users to confirm actions such as saving edits, cancelling changes, or navigating away from an edited row. If disabled, these actions proceed without confirmation. |
| editOnDoubleClick | boolean | true | Indicates whether double-clicking a row should activate edit mode in the Data Grid. When set to true, users can initiate editing by double-clicking a row. If set to false, double-click interactions will not trigger edit mode. This property is useful for controlling interaction behavior in editable grids. |
| mode | 'Normal' | Specifies the editing mode used within the grid. The editing mode defines how users interact with editable cells. Supported modes include:
| |
| newRowPosition | string | NewRowPosition | 'Top' | NewRowPosition.Top | Specifies the position at which a new row is inserted into the grid. Supported values include:
|
| popupSettings | null | Configuration settings for customizing the Syncfusion | |
| popupTemplate | ComponentType<PopupTemplateProps<T>> | null | Custom React component template for rendering the popup edit form.
Used with |
| template | ComponentType<EditFormTemplate<T>> | null | Specifies a custom React component to be used as the edit template for grid rows. This component replaces the default editing interface and receives the current row data as props. It can be used to implement advanced form layouts, validation logic, or custom component integrations. |
| undoRedoLimit | number | 5 | Maximum number of undo actions to maintain in the history stack. When the history exceeds this limit, the oldest action is automatically removed. Non-positive, non-finite, or undefined values default to 5. Valid range: 1 to any positive finite integer. |
Events
The following table outlines the events for the EditSettings:
| Name | Type | Description |
|---|---|---|
| onBatchCommitError | (error: Error, stagedRows: StagedRowData<T>[]) => void | Fires when a batch commit fails. Pending rows remain available for retry. |
| onBatchCommitStart | (stagedRows: StagedRowData<T>[]) => boolean | Fires before the pending batch is committed.
Returning |
| onBatchCommitSuccess | (rowsCommitted: number) => void | Fires after the pending batch is committed successfully. |
| onBatchEditRender | (stagedRow: StagedRowData<T>, fieldName: string) => void | Fires after a field value is staged. |
| onBatchStateChange | (rowKey: string | number, isDirty: boolean) => void | Fires when a row changes between clean and dirty batch state. |