# valueGetter

Returns a cell value calculated from the source row. Use valueFormatter for display-text changes only.

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

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

## What does this API do?

Returns a cell value calculated from the source row. Use valueFormatter for display-text changes only.

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

## Exact input and result types

```typescript
valueGetter?: GridCallback<[ValueGetterParams<TData, TValue, TContext>], TValue> | string
```

| Item | Value |
| --- | --- |
| Required | Optional |
| Input type | GridCallback<[ValueGetterParams<TData, TValue, TContext>], TValue> \| 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)
- [ValueGetterParams](https://grid.syidax.com/docs/types/ValueGetterParams.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.
