# GridCallback

Fields, allowed values, and APIs that use GridCallback.

Canonical: https://grid.syidax.com/docs/types/GridCallback/

<a id="definition"></a>

## 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.

```typescript
export type GridCallback<TArgs extends readonly unknown[], TResult> = {
  bivarianceHack(...args: TArgs): TResult;
}['bivarianceHack'];
```

<a id="used-by"></a>

## APIs using this type

- [valueGetter](https://grid.syidax.com/docs/columns/valueGetter.md) — Returns a cell value calculated from the source row. Use valueFormatter for display-text changes only.
- [valueFormatter](https://grid.syidax.com/docs/columns/valueFormatter.md) — Displays values as readable currency, dates, or other strings without changing the stored source type.
- [tooltipValueGetter](https://grid.syidax.com/docs/columns/tooltipValueGetter.md) — Calculates tooltip content from the current cell context. Do not expose unauthorized values indirectly.
- [cellClass](https://grid.syidax.com/docs/columns/cellClass.md) — CSS classes for the cell or a callback returning classes.
- [cellClassRules](https://grid.syidax.com/docs/columns/cellClassRules.md) — Rules for applying CSS classes conditionally.
- [cellStyle](https://grid.syidax.com/docs/columns/cellStyle.md) — Inline style object, callback, or array of these for the cell.
- [valueParser](https://grid.syidax.com/docs/columns/valueParser.md) — Converts input text to the stored type, for example by normalizing numbers or dates.
- [valueSetter](https://grid.syidax.com/docs/columns/valueSetter.md) — Custom logic for writing a converted value into the source row. Follow the return contract indicating whether a change occurred.
- [comparator](https://grid.syidax.com/docs/columns/comparator.md) — Compares two values and rows for sorting. Negative, zero, and positive results mean before, equal, and after.

<a id="parents"></a>

## Contracts containing this type

- [ColumnDef](https://grid.syidax.com/docs/types/ColumnDef.md)
