Row freezing
Lock the position of specified rows, keeping them visible when scrolling.
Overview
Row freezing locks specific rows of a grid in place, keeping them visible while scrolling to another area of the grid.
This feature is sometimes called “pinned rows”.
Example
The following example specifies two fixed rows with fixedRowsTop: 2. Horizontal scroll bars are needed, so set a container width and overflow: hidden in CSS.
import { HotTable } from '@handsontable/react-wrapper';import { registerAllModules } from 'handsontable/registry';
// register Handsontable's modulesregisterAllModules();
// generate an array of arrays with dummy dataconst data = new Array(100) // number of rows .fill(0) .map((_item, row) => new Array(50) // number of columns .fill(0) .map((_, column) => `${row}, ${column}`) );
const ExampleComponent = () => { return ( <HotTable data={data} colWidths={100} width="100%" height={320} rowHeaders={true} colHeaders={true} fixedRowsTop={2} autoWrapRow={true} autoWrapCol={true} licenseKey="non-commercial-and-evaluation" /> );};
export default ExampleComponent;import { HotTable } from '@handsontable/react-wrapper';import { registerAllModules } from 'handsontable/registry';
// register Handsontable's modulesregisterAllModules();
// generate an array of arrays with dummy dataconst data = new Array(100) // number of rows .fill(0) .map((_item, row) => new Array(50) // number of columns .fill(0) .map((_, column) => `${row}, ${column}`) );
const ExampleComponent = () => { return ( <HotTable data={data} colWidths={100} width="100%" height={320} rowHeaders={true} colHeaders={true} fixedRowsTop={2} autoWrapRow={true} autoWrapCol={true} licenseKey="non-commercial-and-evaluation" /> );};
export default ExampleComponent;Related API reference
Configuration options