This page covers a non-latest version of Handsontable.
# Row freezing
# Overview
Row freezing locks specific rows of a grid in place, keeping them visible while scrolling to another area of the grid.
# 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.
const container = document.querySelector('#example1');
const hot = new Handsontable(container, {
data: Handsontable.helper.createSpreadsheetData(100, 50),
colWidths: 100,
width: '100%',
height: 320,
rowHeaders: true,
colHeaders: true,
fixedRowsTop: 2,
licenseKey: 'non-commercial-and-evaluation'
});
← Row moving Row height →