# Namespace: oSettings

## Ancestry: DataTable » .models. » oSettings

DataTables v1.9.4 documentation

DataTables settings object - this holds all the information needed for a given table, including configuration, data and current application of the table options. DataTables does not have a single instance for each DataTable with the settings attached to that instance, but rather instances of the DataTable "class" are created on-the-fly as needed (typically by a $().dataTable() call) and the settings object is then applied to that instance.

Note that this object is related to DataTable.defaults but this one is the internal data store for DataTables's cache of columns. It should NOT be manipulated outside of DataTables. Any configuration should be done through the initialisation options.

## Summary

### Namespaces

oBrowser

  Browser support parameters

oFeatures

  Primary features of DataTables and their enablement state.

oLanguage

  Language information for the table.

oPreviousSearch

  Store the applied global search information in case we want to force a research or compare the old search to a new one. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

oScroll

  Scrolling settings for a table.

### Properties - static

<static> aanFeatures :array

  Array referencing the nodes which are used for the features. The parameters of this object match what is allowed by sDom - i.e.

  - 'l' - Length changing
  - 'f' - Filtering input
  - 't' - The table!
  - 'i' - Information
  - 'p' - Pagination
  - 'r' - pRocessing
<static> aaSorting :array

  Sorting that is applied to the table. Note that the inner arrays are used in the following manner: [...]

<static> aaSortingFixed :array|null

  Sorting that is always applied to the table (i.e. prefixed in front of aaSorting). Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> aiDisplay :array

  Array of indexes which are in the current display (after filtering etc)

<static> aiDisplayMaster :array

  Array of indexes for display - no filtering

<static> aLengthMenu :array

  List of options that can be used for the user selectable length menu. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> aoColumns :array

  Store information about each column that is in use

<static> aoData :array

  Store data information - see DataTable.models.oRow for detailed information.

<static> aoDestroyCallback :array

  Destroy callback functions - for plug-ins to attach themselves to the destroy so they can clean up markup and events.

<static> aoDrawCallback :array

  Array of callback functions for draw callback functions

<static> aoFooter :array

  Store information about the table's footer

<static> aoFooterCallback :array

  Callback function for the footer on each draw.

<static> aoHeader :array

  Store information about the table's header

<static> aoHeaderCallback :array

  Callback functions for the header on each draw.

<static> aoInitComplete :array

  Callback functions for when the table has been initialised.

<static> aoOpenRows :array

  Information about open rows. Each object in the array has the parameters 'nTr' and 'nParent'

<static> aoPreDrawCallback :array

  Callback functions for just before the table is redrawn. A return of false will be used to cancel the draw.

<static> aoPreSearchCols :array

  Store the applied search for each column - see DataTable.models.oSearch for the format that is used for the filtering information for each column.

<static> aoRowCallback :array

  Callback functions array for every time a row is inserted (i.e. on a draw).

<static> aoRowCreatedCallback :array

  Array of callback functions for row created function

<static> aoServerParams :array

  Functions which are called prior to sending an Ajax request so extra parameters can easily be sent to the server

<static> aoStateLoad :array

  Array of callback functions for state loading. Each array element is an object with the following parameters:

  - function:fn - function to call. Takes two parameters, oSettings and the object stored. May return false to cancel state loading
  - string:sName - name of callback
<static> aoStateLoaded :array

  Callbacks for operating on the settings object once the saved state has been loaded

<static> aoStateLoadParams :array

  Callbacks for modifying the settings that have been stored for state saving prior to using the stored values to restore the state.

<static> aoStateSave :array

  Array of callback functions for state saving. Each array element is an object with the following parameters:

  - function:fn - function to call. Takes two parameters, oSettings and the JSON string to save that has been thus far created. Returns a JSON string to be inserted into a json object (i.e. '"param": [ 0, 1, 2]')
  - string:sName - name of callback
<static> aoStateSaveParams :array

  Callbacks for modifying the settings to be stored for state saving, prior to saving state.

<static> asDataSearch :array

  Search data array for regular expression searching

<static> asDestroyStripes :array

  If restoring a table - we should restore its striping classes as well

<static> asStripeClasses :array

  Classes to use for the striping of a table. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> bAjaxDataGet :boolean

  Note if draw should be blocked while getting data

<static> bDeferLoading :boolean

  Indicate if when using server-side processing the loading of data should be deferred until the second draw. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> bDrawing :boolean

  Indicate if a redraw is being done - useful for Ajax

<static> bFiltered :boolean

  Flag attached to the settings object so you can check in the draw callback if filtering has been done in the draw. Deprecated in favour of events.

<static> bInitialised :boolean

  Indicate if all required information has been read in

<static> bJUI :boolean

  Flag to indicate if jQuery UI marking and classes should be used. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> bSortCellsTop :boolean

  Indicate that if multiple rows are in the header and there is more than one unique cell per column, if the top one (true) or bottom one (false) should be used for sorting / title by DataTables. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> bSorted :boolean

  Flag attached to the settings object so you can check in the draw callback if sorting has been done in the draw. Deprecated in favour of events.

<static> fnCookieCallback :function

  Callback function for cookie creation. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> fnFormatNumber :function

  Format numbers for display. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> fnServerData :function

  Function to get the server-side data. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> iCookieDuration :int

  The cookie duration (for bStateSave) in seconds. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> iDraw :int

  Counter for the draws that the table does. Also used as a tracker for server-side processing

<static> iDrawError :int

  Draw index (iDraw) of the last error when parsing the returned data

<static> iTabIndex

  tabindex attribute value that is added to DataTables control elements, allowing keyboard navigation of the table and its controls.

<static> jqXHR :object

  The last jQuery XHR object that was used for server-side data gathering. This can be used for working with the XHR information in one of the callbacks

<static> nScrollFoot

  DIV container for the footer scrolling table if scrolling

<static> nScrollHead

  DIV container for the footer scrolling table if scrolling

<static> nTable :node

  The TABLE node for the main table

<static> nTableWrapper :node

  Cache the wrapper node (contains all DataTables controlled elements)

<static> nTBody :node

  Permanent ref to the tbody element

<static> nTFoot :node

  Permanent ref to the tfoot element - if it exists

<static> nTHead :node

  Permanent ref to the thead element

<static> oClasses :object

  The classes to use for the table

<static> oInit :object

  Initialisation object that is used for the table

<static> oInstance :object

  The DataTables object for this table

<static> oLoadedState :object

  State that was loaded from the cookie. Useful for back reference

<static> sAjaxDataProp :string

  Property from a given object from which to read the table data from. This can be an empty string (when not server-side processing), in which case it is assumed an an array is given directly. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> sAjaxSource :string

  Source url for AJAX data for the table. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> sCookiePrefix :string

  The cookie name prefix. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> sDestroyWidth :int

  If restoring a table - we should restore its width

<static> sDom :string

  Dictate the positioning of DataTables' control elements - see DataTable.model.oInit.sDom. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> sInstance :string

  Unique identifier for each instance of the DataTables object. If there is an ID on the table node, then it takes that value, otherwise an incrementing internal counter is used.

<static> sPaginationType :string

  Which type of pagination should be used. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> sServerMethod :string

  Send the XHR HTTP method - GET or POST (could be PUT or DELETE if required). Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> sTableId :string

  Cache the table ID for quick access

<static> _iDisplayLength :int

  Paging display length

<static> _iDisplayStart :int

  Paging start point - aiDisplay index

### Methods - static

<static> fnDisplayEnd ()

  Set the display end point - aiDisplay index

<static> fnRecordsDisplay ()

  Get the number of records in the current record set, after filtering

<static> fnRecordsTotal ()

  Get the number of records in the current record set, before filtering

## Details

### Properties - static

<static> aanFeatures :array

  Array referencing the nodes which are used for the features. The parameters of this object match what is allowed by sDom - i.e.

  - 'l' - Length changing
  - 'f' - Filtering input
  - 't' - The table!
  - 'i' - Information
  - 'p' - Pagination
  - 'r' - pRocessing
<static> aaSorting :array

  Sorting that is applied to the table. Note that the inner arrays are used in the following manner:

  - Index 0 - column number
  - Index 1 - current sorting direction
  - Index 2 - index of asSorting for this column

  Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> aaSortingFixed :array|null

  Sorting that is always applied to the table (i.e. prefixed in front of aaSorting). Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> aiDisplay :array

  Array of indexes which are in the current display (after filtering etc)

<static> aiDisplayMaster :array

  Array of indexes for display - no filtering

<static> aLengthMenu :array

  List of options that can be used for the user selectable length menu. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> aoColumns :array

  Store information about each column that is in use

<static> aoData :array

  Store data information - see DataTable.models.oRow for detailed information.

<static> aoDestroyCallback :array

  Destroy callback functions - for plug-ins to attach themselves to the destroy so they can clean up markup and events.

<static> aoDrawCallback :array

  Array of callback functions for draw callback functions

<static> aoFooter :array

  Store information about the table's footer

<static> aoFooterCallback :array

  Callback function for the footer on each draw.

<static> aoHeader :array

  Store information about the table's header

<static> aoHeaderCallback :array

  Callback functions for the header on each draw.

<static> aoInitComplete :array

  Callback functions for when the table has been initialised.

<static> aoOpenRows :array

  Information about open rows. Each object in the array has the parameters 'nTr' and 'nParent'

<static> aoPreDrawCallback :array

  Callback functions for just before the table is redrawn. A return of false will be used to cancel the draw.

<static> aoPreSearchCols :array

  Store the applied search for each column - see DataTable.models.oSearch for the format that is used for the filtering information for each column.

<static> aoRowCallback :array

  Callback functions array for every time a row is inserted (i.e. on a draw).

<static> aoRowCreatedCallback :array

  Array of callback functions for row created function

<static> aoServerParams :array

  Functions which are called prior to sending an Ajax request so extra parameters can easily be sent to the server

<static> aoStateLoad :array

  Array of callback functions for state loading. Each array element is an object with the following parameters:

  - function:fn - function to call. Takes two parameters, oSettings and the object stored. May return false to cancel state loading
  - string:sName - name of callback
<static> aoStateLoaded :array

  Callbacks for operating on the settings object once the saved state has been loaded

<static> aoStateLoadParams :array

  Callbacks for modifying the settings that have been stored for state saving prior to using the stored values to restore the state.

<static> aoStateSave :array

  Array of callback functions for state saving. Each array element is an object with the following parameters:

  - function:fn - function to call. Takes two parameters, oSettings and the JSON string to save that has been thus far created. Returns a JSON string to be inserted into a json object (i.e. '"param": [ 0, 1, 2]')
  - string:sName - name of callback
<static> aoStateSaveParams :array

  Callbacks for modifying the settings to be stored for state saving, prior to saving state.

<static> asDataSearch :array

  Search data array for regular expression searching

<static> asDestroyStripes :array

  If restoring a table - we should restore its striping classes as well

<static> asStripeClasses :array

  Classes to use for the striping of a table. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> bAjaxDataGet :boolean

  Note if draw should be blocked while getting data

<static> bDeferLoading :boolean

  Indicate if when using server-side processing the loading of data should be deferred until the second draw. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> bDrawing :boolean

  Indicate if a redraw is being done - useful for Ajax

<static> bFiltered :boolean

  Flag attached to the settings object so you can check in the draw callback if filtering has been done in the draw. Deprecated in favour of events.

  Deprecated
    Yes
<static> bInitialised :boolean

  Indicate if all required information has been read in

<static> bJUI :boolean

  Flag to indicate if jQuery UI marking and classes should be used. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> bSortCellsTop :boolean

  Indicate that if multiple rows are in the header and there is more than one unique cell per column, if the top one (true) or bottom one (false) should be used for sorting / title by DataTables. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> bSorted :boolean

  Flag attached to the settings object so you can check in the draw callback if sorting has been done in the draw. Deprecated in favour of events.

  Deprecated
    Yes
<static> fnCookieCallback :function

  Callback function for cookie creation. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> fnFormatNumber :function

  Format numbers for display. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> fnServerData :function

  Function to get the server-side data. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> iCookieDuration :int

  The cookie duration (for bStateSave) in seconds. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> iDraw :int

  Counter for the draws that the table does. Also used as a tracker for server-side processing

<static> iDrawError :int

  Draw index (iDraw) of the last error when parsing the returned data

<static> iTabIndex

  tabindex attribute value that is added to DataTables control elements, allowing keyboard navigation of the table and its controls.

<static> jqXHR :object

  The last jQuery XHR object that was used for server-side data gathering. This can be used for working with the XHR information in one of the callbacks

<static> nScrollFoot

  DIV container for the footer scrolling table if scrolling

<static> nScrollHead

  DIV container for the footer scrolling table if scrolling

<static> nTable :node

  The TABLE node for the main table

<static> nTableWrapper :node

  Cache the wrapper node (contains all DataTables controlled elements)

<static> nTBody :node

  Permanent ref to the tbody element

<static> nTFoot :node

  Permanent ref to the tfoot element - if it exists

<static> nTHead :node

  Permanent ref to the thead element

<static> oClasses :object

  The classes to use for the table

<static> oInit :object

  Initialisation object that is used for the table

<static> oInstance :object

  The DataTables object for this table

<static> oLoadedState :object

  State that was loaded from the cookie. Useful for back reference

<static> sAjaxDataProp :string

  Property from a given object from which to read the table data from. This can be an empty string (when not server-side processing), in which case it is assumed an an array is given directly. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> sAjaxSource :string

  Source url for AJAX data for the table. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> sCookiePrefix :string

  The cookie name prefix. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> sDestroyWidth :int

  If restoring a table - we should restore its width

<static> sDom :string

  Dictate the positioning of DataTables' control elements - see DataTable.model.oInit.sDom. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> sInstance :string

  Unique identifier for each instance of the DataTables object. If there is an ID on the table node, then it takes that value, otherwise an incrementing internal counter is used.

<static> sPaginationType :string

  Which type of pagination should be used. Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> sServerMethod :string

  Send the XHR HTTP method - GET or POST (could be PUT or DELETE if required). Note that this parameter will be set by the initialisation routine. To set a default use DataTable.defaults.

<static> sTableId :string

  Cache the table ID for quick access

<static> _iDisplayLength :int

  Paging display length

<static> _iDisplayStart :int

  Paging start point - aiDisplay index

### Methods - static

<static> fnDisplayEnd()

  Set the display end point - aiDisplay index

<static> fnRecordsDisplay()

  Get the number of records in the current record set, after filtering

<static> fnRecordsTotal()

  Get the number of records in the current record set, before filtering