fixedColumns
A single button that initialises and allows FixedColumns to be toggled.
Please note - this property requires the FixedColumns extension for DataTables.
Description
This button type initialises FixedColumns and then when pressed the columns are toggled between being fixed to the table and not fixed to the table.
Options
This button can have the following options set in its configuration object to customise its actions and display, in addition to those options which are available for all buttons (e.g. buttons.buttons.text
):
Name | Type | Default |
---|---|---|
config | {} | |
This option allows for FixedColumns to be configured as it would in a normal initialisation. All of the | ||
text | FixedColumns | |
This options allows the text within the button to be configured. This can also be configured with the |
Examples
Basic FixedColumns button initialisation:
new DataTable('#myTable', {
buttons: ['fixedColumns']
});
Fix two columns start and another at the end of the table:
new DataTable.Buttons(table, {
buttons: [
{
extend: 'fixedColumns',
config: {
start: 2,
end: 1
}
}
]
});