# valueFormatter

Displays values as readable currency, dates, or other strings without changing the stored source type.

Canonical: https://grid.syidax.com/docs/columns/valueFormatter/

<a id="meaning"></a>

## What does this API do?

Displays values as readable currency, dates, or other strings without changing the stored source type.

<a id="contract"></a>

## Exact input and result types

```typescript
valueFormatter?: GridCallback<[ValueFormatterParams<TData, TValue, TContext>], string> | string
```

| Item | Value |
| --- | --- |
| Required | Optional |
| Input type | GridCallback<[ValueFormatterParams<TData, TValue, TContext>], string> \| string |

<a id="usage"></a>

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

<a id="types"></a>

## Read related types

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

<a id="recipes"></a>

## Feature explanations and examples

- [Separate calculation and display](https://grid.syidax.com/docs/features/value-getter-formatter.md) — valueGetter produces a calculated value, while valueFormatter produces readable display text. Return numbers from getters when totals, sorting, or comparisons require numeric values.
