The editing API interface that is available in the grid apiRef.

interface GridEditingApi {
    getCellMode: ((id: GridRowId, field: string) => GridCellMode);
    getRowMode: ((id: GridRowId) => GridRowMode);
    getRowWithUpdatedValues: ((id: GridRowId, field: string) => GridValidRowModel);
    isCellEditable: ((params: GridCellParams<any, unknown, unknown, GridTreeNode>) => boolean);
    setEditCellValue: ((params: GridEditCellValueParams, event?: MuiBaseEvent) => void | Promise<boolean>);
    startCellEditMode(params: GridStartCellEditModeParams): void;
    startRowEditMode(params: GridStartRowEditModeParams): void;
    stopCellEditMode(params: GridStopCellEditModeParams): void;
    stopRowEditMode(params: GridStopRowEditModeParams): void;
}

Hierarchy (view full)

Properties

getCellMode: ((id: GridRowId, field: string) => GridCellMode)

Gets the mode of a cell.

Type declaration

getRowMode: ((id: GridRowId) => GridRowMode)

Gets the mode of a row.

Type declaration

getRowWithUpdatedValues: ((id: GridRowId, field: string) => GridValidRowModel)

Returns the row with the values that were set by editing the cells. In row editing, field is ignored and all fields are considered.

Type declaration

isCellEditable: ((params: GridCellParams<any, unknown, unknown, GridTreeNode>) => boolean)

Controls if a cell is editable.

Type declaration

    • (params): boolean
    • Parameters

      Returns boolean

      A boolean value determining if the cell is editable.

setEditCellValue: ((params: GridEditCellValueParams, event?: MuiBaseEvent) => void | Promise<boolean>)

Sets the value of the edit cell. Commonly used inside the edit cell component.

Type declaration

    • (params, event?): void | Promise<boolean>
    • Parameters

      Returns void | Promise<boolean>

      A promise with the validation status.

Methods

  • Puts the cell corresponding to the given row id and field into edit mode.

    Parameters

    • params: GridStartCellEditModeParams

      The row id and field of the cell to edit.

    Returns void

  • Puts the row corresponding to the given id into edit mode.

    Parameters

    • params: GridStartRowEditModeParams

      The row id edit.

    Returns void

  • Puts the cell corresponding to the given row id and field into view mode and updates the original row with the new value stored. If params.ignoreModifications is true it will discard the modifications made.

    Parameters

    • params: GridStopCellEditModeParams

      The row id and field of the cell to stop editing.

    Returns void

  • Puts the row corresponding to the given id and into view mode and updates the original row with the new values stored. If params.ignoreModifications is true it will discard the modifications made.

    Parameters

    • params: GridStopRowEditModeParams

      The row id and field of the cell to stop editing.

    Returns void