āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/1771-technologies/lytenyte/(cell)/cell-editing ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
LyteNyte Grid lets you edit cell values directly in the grid. Editing is configured per cell.
To enable editing:
editCellMode to "cell" in grid state. (Default is "readonly".)editable: true.Control how editing starts with editClickActivator. Supported values:
"single-click""double-click""none"The example below shows a basic setup where columnBase: { editable: true } makes all columns editable.
!demo:Cell Edit Predicate="./demos/cell-editing"
Set the editRenderer property on a column to define its cell editor. This can be:
Register edit providers with the editRenderers property in grid state.
!demo:Cell Edit Renderers="./demos/cell-editing-provider"
When using a custom editor, LyteNyte Grid passes:
value - The current cell value.onChange - A function to update the value.Editing is controlled: Enter accepts changes, Escape cancels.
editable can be:
Example: In the Job column, only "management" values are editable.
!demo:Cell Editing Selectively="./demos/cell-editing-selectively"
Use editSetter to control how updated values are written to row data. This is useful when a cell's
value comes from a derived or nested field. The field property determines the
displayed value.
When editing:
editSetter (or via field for string/number fields).!demo:Cell Editing Edit Setter="./demos/cell-editing-edit-setter"
Edits are applied at the row level-updating one cell updates the row's entire data object.
If defined, editRowValidatorFn runs before updates are applied. It can:
true - Validation passes.false - Validation fails.If validation fails, the editError event is fired. Use this event to inform the user.
Example: Prevent negative values in the Age column.
!demo:Cell Editing Validation="./demos/cell-editing-validation"
Use grid.api.editUpdate to update a cell without user interaction. This method:
editSetter.LyteNyte Grid emits these events during editing:
editBegin - Fired before editing starts; call preventDefault() to block it.editEnd - Fired after updates are applied.editError - Fired when validation fails or an error occurs.editCancel - Fired when editing is cancelled (e.g., pressing Escape).ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā