Class: FixedDataTable

Navigation

Hiding private elements (toggle)
Showing extended elements (toggle)
new FixedDataTable( options:FixedDataTable.Options )

When using dataTables plug-in http://datatables.net
along with FixedColumns plug-in http://www.datatables.net/extras/fixedcolumns
there are many inconsistencies between the normal behavior of dataTales and the mixed usage.
For example the fnGetNodes will return rows but with columns that are not fixed.
FixedDataTable wraps the complex stuff between the mixed usage of dataTables and FixedColumns and provides useful methods, properties, events and call-backs. FixedDataTable expects a table with the following structure:

  1. THEAD
  2. TBODY

Constructor

Parameters:
Name Type Attributes Default Description
1
optionsFixedDataTable.Optionsundefined
Example:
		var options = new FixedDataTable.Options();
		options.id = 'resultTable';
		options.cssClass = 'resultTable';
		options.jQuery = false;				
		options.fixLeft = 4;
		options.sortDisable = [0],
		options.multipleSelect = false;
		options.onClick = function (clicked) {};
		options.checkboxSelection = true;
		options.checkboxClass = 'selectRow';
		options.checkboxSelectAllId = 'selectAll';
		options.onCheckboxClick = function ( checked, selectedRows ) {};
		options.columnTypes = {
			4 : 'uk_date',
			5 : 'uk_date'
		};
				
		table = new FixedDataTable( options );	

Requires

  • module:jQuery
  • module:DataTables
  • module:FixedColumns

Summary

Classes

Options

Namespaces

clicked
Contains a reference to the last clicked row
defaults
FixedDataTable default settings for initialisation

Properties

dTable :Object
A reference to the dataTable object http://www.datatables.net
elements :FixedDataTable.Options
The configuration options for the creation of the FixedDataTable object
fcTable :FixedColumns
A reference to the dataTable object http://www.datatables.net/extras/fixedcolumns
<private> _fnSettings :Object
Caches the result of that.dTable.fnSettings() when creating a new FixedDataTable

Methods

fnDestroy( )
It is preferable to call this method when you delete the table and no longer need it. It frees the resources atken by the FixedDataTable - mainly event handlers.
<private> _findRow( table, id )
Performs a search for a row in a table by id of the row
<private> _fnInit( config:FixedDataTable.Configurator )

Details

Properties

dTable :Object

A reference to the dataTable object http://www.datatables.net

elements :FixedDataTable.Options

The configuration options for the creation of the FixedDataTable object

fcTable :FixedColumns

A reference to the dataTable object http://www.datatables.net/extras/fixedcolumns

<private> _fnSettings :Object

Caches the result of that.dTable.fnSettings() when creating a new FixedDataTable

Methods

fnDestroy( )

It is preferable to call this method when you delete the table and no longer need it. It frees the resources atken by the FixedDataTable - mainly event handlers.

<private> _findRow( table, id )

Performs a search for a row in a table by id of the row

Parameters:
Name Type Attributes Default Description
1
tableThe table that contains the row we are interested in
2
idThe id of the row
Returns:

a reference to the row or null

<private> _fnInit( config:FixedDataTable.Configurator )
Parameters:
Name Type Attributes Default Description
1
configFixedDataTable.Configuratorconfiguration setting object