API REFERENCE
valueFormatter
Displays values as readable currency, dates, or other strings without changing the stored source type.
What does this API do?
Displays values as readable currency, dates, or other strings without changing the stored source type.
Exact input and result types
valueFormatter?: GridCallback<[ValueFormatterParams<TData, TValue, TContext>], string> | string| Item | Value |
|---|---|
| Required | Optional |
| Input type | GridCallback<[ValueFormatterParams<TData, TValue, TContext>], string> | string |
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
- Separate calculation and display
valueGetter produces a calculated value, while valueFormatter produces readable display text. Return numbers from getters when totals, sorting, or comparisons require numeric values.