# colSpan

Returns the horizontal column span from cell context. Account for pinned boundaries and hidden columns.

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

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

## What does this API do?

Returns the horizontal column span from cell context. Account for pinned boundaries and hidden columns.

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

## Exact input and result types

```typescript
colSpan?: (params: SyGridColSpanParams<TData>) => number
```

| Item | Value |
| --- | --- |
| Required | Optional |
| Input type | (params: SyGridColSpanParams<TData>) => number |

<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

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

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

## Feature explanations and examples

- [Row height and pinned rows](https://grid.syidax.com/docs/features/row-layout.md) — Row height, top/bottom pinned rows, full-width rows, and merged cells are separate layout features. Choose based on whether you need persistent summaries or wide detail content.
