DataChangeRequestEvent
Defines event arguments for custom data source change requests in the Data Grid component. Provides parameters for handling data modifications, such as adding, updating, or deleting records. Used to manage data change operations and their associated actions in the grid.
Props
The following table outlines the props for the DataChangeRequestEvent:
| Name | Type | Default | Description |
|---|---|---|---|
| action | string | - | Specifies the type of action being performed, such as add, edit, or delete. |
| cancelDataChanges | Function | null | Specifies a function to cancel the editing process. Executes logic to discard changes and revert the grid to its previous state. Used to handle cancellation of inline editing operations. |
| data | T | T[] | null | Contains the modified data for the operation. Represents the record affected by the data change, such as new or updated rows. Used to process or validate the data being modified. |
| key | string | string[] | - | Specifies the primary column field used to identify records in the data source. Defines the unique key for operations like updating or deleting specific records. Used to target specific rows for data modifications. |
| rowIndex | number | 0 | Specifies the index of the row affected by the data change operation. Identifies the row’s position in the grid for operations like insertion or selection. Used to manage row-specific actions or UI updates. |
| saveDataChanges | Function | null | Specifies a function to finalize the editing process after a data change. Executes logic to complete the edit operation. Used to manage the conclusion of editing in the grid. |
| state | null | Contains the state of the grid’s data request, including pagination, filtering, or sorting criteria. Provides context for the data change operation, such as the current grid state. Used to align the change with the grid’s current data configuration. |