API REFERENCE
GridCallback
Fields, allowed values, and APIs that use GridCallback.
Type definition
A question mark (?) marks an optional field; readonly marks a value you should not change directly. A union (|) accepts one of the listed forms. Functions are callbacks that Grid invokes at the relevant point.
export type GridCallback<TArgs extends readonly unknown[], TResult> = {
bivarianceHack(...args: TArgs): TResult;
}['bivarianceHack'];APIs using this type
- valueGetter
Returns a cell value calculated from the source row. Use valueFormatter for display-text changes only.
- valueFormatter
Displays values as readable currency, dates, or other strings without changing the stored source type.
- tooltipValueGetter
Calculates tooltip content from the current cell context. Do not expose unauthorized values indirectly.
- cellClass
CSS classes for the cell or a callback returning classes.
- cellClassRules
Rules for applying CSS classes conditionally.
- cellStyle
Inline style object, callback, or array of these for the cell.
- valueParser
Converts input text to the stored type, for example by normalizing numbers or dates.
- valueSetter
Custom logic for writing a converted value into the source row. Follow the return contract indicating whether a change occurred.
- comparator
Compares two values and rows for sorting. Negative, zero, and positive results mean before, equal, and after.