# Salmon UI Data Grid documentation

> A virtualized React 19 data grid. Every page embeds live demos.

Canonical: https://salmonui.dev/docs/data-grid

## Columns

- [Columns](https://salmonui.dev/docs/data-grid/columns.md): Column definitions, widths, alignment, types and formats, visibility, resizing, reordering and auto-size.
- [Column chooser](https://salmonui.dev/docs/data-grid/column-chooser.md): A searchable dialog that shows and hides columns, opened from the toolbar, the column menu or the API.

## Frozen Rows and Columns

- [Pinned columns and sticky rows](https://salmonui.dev/docs/data-grid/pinned-columns.md): Pin columns to the start or end, fix them in place between the scrolling columns, and keep the first or last rows in view while the body scrolls.
- [Pinned rows](https://salmonui.dev/docs/data-grid/pinned-rows.md): Pin records to the top of the grid by data or at runtime; pinned rows follow sorting, filtering and edits and stay outside the page size.

## Stacked Headers

- [Stacked headers](https://salmonui.dev/docs/data-grid/stacked-headers.md): Group columns under multi-level headers with nested column definitions; operations act on the leaf columns.

## Row and Column Spanning

- [Row and column spans](https://salmonui.dev/docs/data-grid/cell-spans.md): Span cells across columns and rows with column `colSpan` and `rowSpan`, or merge equal adjacent values grid-wide with `mergeCells`.

## Column Resize, Reorder, Chooser, Menu

- [Column menu](https://salmonui.dev/docs/data-grid/column-menu.md): A per-header menu with built-in sort, filter, group, auto-size, pin and chooser items, custom items and submenus, per-column items and keyboard access.

## Context Menu

- [Context menu](https://salmonui.dev/docs/data-grid/context-menu.md): A right-click and Shift+F10 menu for headers, cells, rows, group captions and the pager, with built-in and custom items and per-target control.

## Toolbar

- [Toolbar](https://salmonui.dev/docs/data-grid/toolbar.md): Built-in and custom toolbar items, alignment, search, overflow, keyboard navigation and a replaceable toolbar.

## Templates

- [Templates](https://salmonui.dev/docs/data-grid/templates.md): Cell, header and row templates, filter, pager, toolbar, editor and empty templates, per-row and per-cell attribute hooks, and the rules templates follow.

## Virtual Scroll

- [Virtualization](https://salmonui.dev/docs/data-grid/virtualization.md): Row and column virtualization, scaled scrolling for millions of rows, measured row heights and the server-rendered initial range.

## Performance

- [Performance](https://salmonui.dev/docs/data-grid/performance.md): What the grid re-renders, how to observe it in development, and the budgets that gate every release.

## Theming and Appearance

- [Theming and appearance](https://salmonui.dev/docs/data-grid/appearance.md): Theming with five color seeds, light and dark schemes, compact density, the font family, a tinted neutral ramp and region surfaces, plus grid lines, alternate rows, hover, row and header height, text wrap, custom icons and stable CSS hooks.

## Selection

- [Selection](https://salmonui.dev/docs/data-grid/selection.md): Row, cell and column selection with pointer, keyboard and methods; id-based, persistent and virtualization-safe.

## Sorting

- [Sorting](https://salmonui.dev/docs/data-grid/sorting.md): Header sorting, multi-column sort, initial sort, custom comparators and sort methods.

## Filtering

- [Filtering](https://salmonui.dev/docs/data-grid/filtering.md): The filter row, menu, checklist and Excel filter UIs, operators, initial and nested filters, case and accent matching, filter methods and server-side filtering.

## Searching

- [Searching](https://salmonui.dev/docs/data-grid/searching.md): The toolbar search box, the search prop with its text, columns, operator and case and accent options, highlighted matches, search methods and events, and server-side search.

## Paging

- [Paging](https://salmonui.dev/docs/data-grid/paging.md): The pager, page and page size state, page buttons and sizes, keyboard, localized text, the narrow layout, a custom pager, page methods and events, paging with groups, and cursor paging.
- [Server paging and the URL](https://salmonui.dev/docs/data-grid/url-paging.md): Remote paging with or without a reported total, the page kept in the query string, view change events and the data error state.

## Grouping

- [Grouping](https://salmonui.dev/docs/data-grid/grouping.md): Group rows by one or more columns from the drop area, the keyboard or methods; virtualized, with preserved expansion.

## Editing

- [Editing](https://salmonui.dev/docs/data-grid/editing.md): Row, batch, dialog and cell editing; built-in and custom editors; command column; edit methods and events; saving through the data source; edit marks; confirm prompts; the unsaved-changes guard; undo and redo.

## Validation

- [Validation](https://salmonui.dev/docs/data-grid/validation.md): Column validation rules, custom and async validators, row-level rules, batch validation, messages and their localization, and the inline error wiring.

## Clipboard

- [Clipboard](https://salmonui.dev/docs/data-grid/clipboard.md): Copy cell ranges, selected rows or the focused cell as TSV with or without headers, paste spreadsheet blocks into edit drafts, formatted or raw copy text per column, `onBeforeCopy` and `onBeforePaste`, and the fallbacks when the browser blocks clipboard access.

## Aggregates

- [Aggregates](https://salmonui.dev/docs/data-grid/aggregates.md): Footer, group footer and group caption summaries with built-in and custom aggregate types.

## Lazy Load Grouping

- [Lazy load grouping](https://salmonui.dev/docs/data-grid/lazy-grouping.md): Server-side grouping that loads group captions first and children on demand.

## Infinite Scroll

- [Infinite scrolling](https://salmonui.dev/docs/data-grid/infinite-scroll.md): Remote rows read in blocks as the viewport approaches them, with loading rows, a bounded block cache, a load-next command and server-rendered first blocks.

## Data Binding

- [Data sources](https://salmonui.dev/docs/data-grid/data-sources.md): Local arrays, the Salmon UI JSON protocol, offline, live and application-controlled data sources.

## Methods and Commands

- [Data Grid API and keyboard hooks](https://salmonui.dev/docs/data-grid/api.md): The imperative grid instance and custom keyboard handling.

## Events

- [Events](https://salmonui.dev/docs/data-grid/events.md): The event model - onReady, before-event and after-event pairs, header attributes, and the interaction events of selection, resizing, column drag and the menus.

## State Persistence

- [State persistence](https://salmonui.dev/docs/data-grid/state-persistence.md): Save and restore the user's grid state with persistState, read and apply it with getState and restoreState, reset it, share it as a URL-safe string, and keep named saved views.

## Globalization and Localization

- [Locale provider](https://salmonui.dev/docs/data-grid/locale-provider.md): Localize every Salmon UI component at once with LocaleProvider and the built-in Traditional Chinese pack, override single strings, nest providers, and add your own locale pack.
- [Localization](https://salmonui.dev/docs/data-grid/localization.md): Translate every grid string with the localeText catalog, format numbers, dates and money per locale, and pick the text direction from the locale.

## RTL

- [Right-to-left](https://salmonui.dev/docs/data-grid/rtl.md): RTL layout, keyboard and scrolling.

## Accessibility

- [Accessibility](https://salmonui.dev/docs/data-grid/accessibility.md): One ARIA grid tree, the keyboard map, live-region announcements, focus across virtualization and overlays, accessible names, contrast, reduced motion and forced colors.

## Adaptive UI

- [Adaptive UI](https://salmonui.dev/docs/data-grid/adaptive.md): Adaptive layout for narrow containers and touch, vertical card rows, full-screen sheets, and touch selection.

## Foreign Key

- [Lookup columns](https://salmonui.dev/docs/data-grid/lookup-columns.md): Foreign-key columns that store a key and show, sort, filter, search and group by a looked-up value, from a local table or a cached remote source.

## Export and print

- [Export](https://salmonui.dev/docs/data-grid/export.md): Excel, PDF and CSV export of the grid view with hooks, events, several grids per workbook, server export and on-demand writers.
- [Print](https://salmonui.dev/docs/data-grid/print.md): Print every row of the grid view without virtualization, all pages or the current page, with print events and a print stylesheet.

## Detail Template

- [Detail rows](https://salmonui.dev/docs/data-grid/detail-rows.md): Expandable detail rows with a render prop, async loading, per-row and expand-all control, keyboard support and virtualization.

## Hierarchy Grid

- [Child grids](https://salmonui.dev/docs/data-grid/child-grids.md): Hierarchy grids with child grids joined by a field, any nesting depth, inherited locale and theme, and lazy mounting.

## Tree Grid

- [Tree Grid](https://salmonui.dev/docs/data-grid/tree.md): DataGrid tree mode for hierarchical data. Nested or flat self-referential rows, expansion, tree keys, filter and paging modes, checkbox cascade, child summaries, drag and indent, and lazy remote children.

## Row Drag and Drop

- [Row drag and drop](https://salmonui.dev/docs/data-grid/row-drag.md): Reorder rows by pointer or keyboard, drag several rows, drop into another grid or a custom element, with cancelable events and persisted order.
