FixedHeader & FixedColumns
DataTables docsFixedHeader floats the header on page scroll; FixedColumns pins the first column during horizontal scroll. Scroll the table sideways to see the pinned ID/Name columns stay put.
| ID | Name | Position | Office | Age | Start date | Salary | Status |
|---|
import 'datatables.net-fixedheader';
import 'datatables.net-fixedcolumns';
options: Config = {
scrollX: true,
fixedHeader: true,
fixedColumns: { start: 2 }, // pin first 2 columns
};