{hero}

fixedColumns

Since: FixedColumns 4.0.0

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):

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
			}
		}
	]
});