fixedColumns.leftColumns
Number of columns to fix to the left of the table.
Please note - this property requires the FixedColumns extension for DataTables.
Deprecated!
As of v4.0.0 this feature has been deprecated. This feature has not yet been scheduled for removal, but its use is discouraged and the alternatives discussed below should be used.
As of FixedColumns 4.0.0 this option has been replaced by the fixedColumns.left
option. There is no behaviour change here, but the naming is an improvement.
For now this option will continue to be supported, however it will be removed in the future. We encourage you to move instead to fixedColumns.left
.
Description
FixedColumns, by default, will fix only the left most column in place, however it is also possible to fix two or more columns in place as required by your application. The number of columns to fix in place is defined by this parameter, which is simply an integer that indicates how many columns should be fixed. FixedColumns will then use this value to fix that many visible columns to the left side of the table. Columns that are not visible will be ignored.
This option is deprecated and is replaced by the fixedColumns.left
option.
Type
Default
- Value:
1
The first column on the left of the table will be fixed in place.
Examples
Fixed two columns to the left of the table:
new DataTable('#myTable', {
fixedColumns: {
leftColumns: 2
}
});
Fix no columns on the left of the table:
new DataTable('#myTable', {
fixedColumns: {
leftColumns: 0,
rightColumns: 1
}
});