API REFERENCE

cellStyle

Inline style object, callback, or array of these for the cell.

What does this API do?

Inline style object, callback, or array of these for the cell.

Exact input and result types

typescript
cellStyle?: | Record<string, string | number>
    | GridCallback<
        [CellCallbackParams<TData, TValue, TContext>],
        Record<string, string | number> | null | undefined
      >
    | ReadonlyArray<
        | Record<string, string | number>
        | GridCallback<
            [CellCallbackParams<TData, TValue, TContext>],
            Record<string, string | number> | null | undefined
          >
      >
ItemValue
RequiredOptional
Input type| Record<string, string | number> | GridCallback< [CellCallbackParams<TData, TValue, TContext>], Record<string, string | number> | null | undefined > | ReadonlyArray< | Record<string, string | number> | GridCallback< [CellCallbackParams<TData, TValue, TContext>], Record<string, string | number> | null | undefined > >

Usage flow

Set this on an individual column object in columnDefs. Pass arrays, objects, and callbacks through JavaScript, and use new arrays or objects when applying changes.

Read related types

Feature explanations and examples