{hero}

fixedHeader

Since: FixedHeader 3.0.0

FixedHeader configuration object.
Please note - this property requires the FixedHeader extension for DataTables.

Description

FixedHeader is an extension for DataTables that provides the ability to show a header and / or footer that is sticky - i.e. the element will affix itself to the top or bottom of the window as the end user scrolls through the table. The result is that the end user will be able to see the header / footer of the table as they scroll through the table. The fixed elements will then scroll off the page as the user scrolls past the table.

This configuration option provides configuration options for FixedHeader, including simple initialisation and finer grained control of the individual features of FixedHeader.

Types

boolean

Description:

Enable FixedHeader, using the defaulting configuration options (defined by $.fn.dataTable.FixedHeader.defaults).

object

Description:

Fine grained initialisation control of FixedHeader allowing full configuration of the available options. Please refer to the individual initialisation options for full details.

Default

  • Value: undefined

FixedHeader is not automatically enabled on a DataTable. This parameter should be used if you wish to use this feature.

Examples

Enable FixedHeader with default values:

new DataTable('#myTable', {
	fixedHeader: true
});

Enable FixedHeader with footer also enabled:

new DataTable('#myTable', {
	fixedHeader: {
		footer: true
	}
});