{hero}

fixedColumns

Since: FixedColumns 1.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:

Examples

Basic FixedColumns button initialisation:

$('#myTable').DataTable( {
	buttons: [
		'fixedColumns'
	],
} );

Fix two columns left and another right:

new $.fn.dataTable.Buttons( table, {
	buttons: [
		{
			extend: 'fixedColumns',
			config: {
				left: 2,
                right: 1
			}
		}
	],
} );