Classes (0) | Namespaces (0) |
Properties (0) | Static properties (1) |
Methods (0) | Static methods (85) |
Events (0) |
Properties (0) | Static properties (1) |
Methods (0) | Static methods (85) |
Events (0) |
Reference to internal functions for use by plug-in developers. Note that these methods are references to internal functions and are considered to be private. If you use these methods, be aware that they are liable to change between versions (check the upgrade notes).
JSON stringify. If JSON.stringify it provided by the browser, json2.js or any other library, then we use that as it is fast, safe and accurate. If the function isn't available then we need to built it ourselves - the inspiration for this function comes from Craig Buckler ( http://www.sitepoint.com/javascript-json-serialization/ ). It is not perfect and absolutely should not be used as a replacement to json2.js - but it does do what we need, without requiring a dependency for DataTables.
Add a column to the list used for the table with default values
Add a data array to the table, creating DOM node etc. This is the parallel to _fnGatherData, but for adding rows from a Javascript source, rather than a DOM source.
Add the options to the page HTML for the table
Adjust the table column widths for new data. Note: you would probably want to do a redraw after calling this function!
Build up the parameters in an object needed for a server-side processing request
Update the table using an Ajax call
Data the data from the server (nuking the old) and redraw the table
Take the column definitions and static columns arrays and calculate how they relate to column indexes. The callback function will then apply the definition found for a column to a suitable configuration object.
Apply a given function to the display child nodes of an element array (typically TD children of TR rows
Bind an event handers to allow a click or return key to activate the callback. This is good for accessibility since a return on the keyboard will have the same effect as a click, if the element has focus.
From some browsers (specifically IE6/7) we need special handling to work around browser bugs - this function is used to detect when these workarounds are needed.
Create the HTML header for the table
Create an array which can be quickly search through
Create a searchable string from a single data row
Calculate the width of columns for the table
Recalculate the end point based on the start point
Fire callback functions and trigger events. Note that the loop over the callback array store is done backwards! Further note that you do not want to fire off triggers in time sensitive applications (for example cell creation) as its slow.
Register a callback function. Easily allows a callback function to be added to an array store of callback functions that can then all be called together.
Nuke the table
Covert the index of an index in the data array and convert it to the visible column index (take account of hidden columns)
Apply options for a column
Get the column ordering that DataTables expects
Convert a CSS unit width to pixels (e.g. 2em)
Create a new cookie with a value to store the state of a table
Create a new TR element (and it's TD children) for a row
Convert raw data into something that the user can search on
Take an array of integers (index array) and remove a target integer (value - not the key!)
Use the DOM source to create up an array of header cells. The idea here is to create a layout grid (array) of rows x columns, which contains a reference to the cell that that point in the grid (regardless of col/rowspan), such that any column / row could be removed and the new grid constructed
Get the sort type based on an input string
Insert the required TR nodes into the table for display
Draw the header (or footer) element based on the column visibility states. The methodology here is to use the layout array from _fnDetectHeader, modified for the instantaneous column visibility, to construct the new layout. The grid is traversed over cell at a time in a rows x columns grid fashion, although each cell insert can cover multiple elements in the grid - which is tracks using the aApplied array. Cell inserts in the grid will only occur where there isn't already a cell in that position.
scape a string such that it can be used in a regular expression
Extend objects - very similar to jQuery.extend, but deep copy objects, and shallow copy arrays. The reason we need to do this, is that we don't want to deep copy array init values (such as aaSorting) since the dev wouldn't be able to override them, but we do want to deep copy arrays.
Create a wrapper function for exporting an internal functions to an external API.
Generate the node required for filtering text
Generate the node required for the info display
Generate the node required for user display length changing
Generate the node required for default pagination
Generate the node required for the processing node
Add any control elements for the table - specifically scrolling
Filter the data table based on user input and draw the table
Filter the table on a per-column basis
Filter the table using both the global filter and column based filtering
Build a regular expression object suitable for searching a table
Apply custom filtering functions
Read in the data from the target table from the DOM
Get the data for a given cell from the internal cache, taking into account data mapping
Get an array of column indexes that match a given property
Return an array with the full table data
Get the maximum strlen for each data column
Return a function that can be used to get data from a source object, taking into account the ability to use nested objects as a source
Get an array of data for a given row from the internal data cache
Return an flat array with all TD nodes for the table, or row
Return an array with the TR nodes for the table
Get an array of unique th elements, one for each column
Get the widest node
Draw the table for the first time, adding all required features
Draw the table for the first time, adding all required features
Language compatibility - when certain options are given, and others aren't, we need to duplicate the values over, in order to provide backwards compatibility with older language files.
Attempt to load a saved table state from a cookie
Log an error message
See if a property is defined on one object, if so assign it to the other object
Take a TD element and convert it into a column data index (not the visible index)
Take a TR element and convert it to an index in aoData
Alter the display settings to change the page
Display or hide the processing indicator
Read an old cookie to get a cookie with an old table state
Redraw the table - taking account of the various features which are enabled
Call the developer defined fnRender function for a given cell (row/column) with the required parameters and return the result.
Figure out how to reorder a display list
Save the state of a table in a cookie such that the page can be reloaded
Get the width of a scroll bar in this browser being used
Update the various tables for resizing. It's a bit of a pig this function, but basically the idea to: 1. Re-create the table inside the scrolling div 2. Take live measurements from the DOM 3. Apply the measurements 4. Clean up
Adjust a table's width to take account of scrolling
Add Ajax parameters from plug-ins
Set the value for a specific cell, into the internal data cache
Return a function that can be used to set data from a source object, taking into account the ability to use nested objects as a source
Return the settings object for a particular table
Change the order of the table
Attach a sort handler (click) to a node
Set the sorting classes on the header, Note: it is safe to call this function when bSort and bSortClasses are false
Append a CSS unit (only if required) to a string
Update the information elements in the display
Get the number of visible columns
Covert the index of a visible column to the index in the data array (take account of hidden columns)
JSON stringify. If JSON.stringify it provided by the browser, json2.js or any other library, then we use that as it is fast, safe and accurate. If the function isn't available then we need to built it ourselves - the inspiration for this function comes from Craig Buckler ( http://www.sitepoint.com/javascript-json-serialization/ ). It is not perfect and absolutely should not be used as a replacement to json2.js - but it does do what we need, without requiring a dependency for DataTables.
Add a column to the list used for the table with default values
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | nTh | node | The th element for this column |
Add a data array to the table, creating DOM node etc. This is the parallel to _fnGatherData, but for adding rows from a Javascript source, rather than a DOM source.
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | aData | array | data array to be added |
=0 if successful (index of new aoData entry), -1 if failed
Add the options to the page HTML for the table
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Adjust the table column widths for new data. Note: you would probably want to do a redraw after calling this function!
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Build up the parameters in an object needed for a server-side processing request
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
block the table drawing or not
Update the table using an Ajax call
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Block the table drawing or not
Data the data from the server (nuking the old) and redraw the table
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | json | object | json data return from the server. | ||
json.sEcho | string | Tracking flag for DataTables to match requests | |||
json.iTotalRecords | int | Number of records in the data set, not accounting for filtering | |||
json.iTotalDisplayRecords | int | Number of records in the data set, accounting for filtering | |||
json.aaData | array | The data to display on this page | |||
json.sColumns | string | <optional> | Column ordering (sName, comma separated) |
Take the column definitions and static columns arrays and calculate how they relate to column indexes. The callback function will then apply the definition found for a column to a suitable configuration object.
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | aoColDefs | array | The aoColumnDefs array that is to be applied | ||
3 | aoCols | array | The aoColumns array that defines columns individually | ||
4 | fn | function | Callback function - takes two parameters, the calculated column index and the definition for that column. |
Apply a given function to the display child nodes of an element array (typically TD children of TR rows
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | fn | function | Method to apply to the objects | ||
2 | array | {nodes} an1 List of elements to look through for display children | |||
3 | array | {nodes} an2 Another list (identical structure to the first) - optional |
Bind an event handers to allow a click or return key to activate the callback. This is good for accessibility since a return on the keyboard will have the same effect as a click, if the element has focus.
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | n | element | Element to bind the action to | ||
2 | oData | object | Data object to pass to the triggered function | ||
3 | fn | function | Callback function for when the event is triggered |
From some browsers (specifically IE6/7) we need special handling to work around browser bugs - this function is used to detect when these workarounds are needed.
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Create the HTML header for the table
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Create an array which can be quickly search through
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | iMaster | int | use the master data array - optional |
Create a searchable string from a single data row
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | aData | array | Row data array to use for the data to search |
Calculate the width of columns for the table
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Recalculate the end point based on the start point
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Fire callback functions and trigger events. Note that the loop over the callback array store is done backwards! Further note that you do not want to fire off triggers in time sensitive applications (for example cell creation) as its slow.
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | sStore | string | Name of the array storage for the callbacks in oSettings | ||
3 | sTrigger | string | Name of the jQuery custom event to trigger. If null no trigger is fired | ||
4 | aArgs | array | Array of arguments to pass to the callback function / trigger |
Register a callback function. Easily allows a callback function to be added to an array store of callback functions that can then all be called together.
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | sStore | string | Name of the array storage for the callbacks in oSettings | ||
3 | fn | function | Function to be called back | ||
4 | sName | string | Identifying name for the callback (i.e. a label) |
Nuke the table
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Covert the index of an index in the data array and convert it to the visible column index (take account of hidden columns)
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | iMatch | int | Column index to lookup | ||
2 | oSettings | object | dataTables settings object |
i the data index
Apply options for a column
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | iCol | int | column index to consider | ||
3 | oOptions | object | object with sType, bVisible and bSearchable etc |
Get the column ordering that DataTables expects
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
comma separated list of names
Convert a CSS unit width to pixels (e.g. 2em)
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | sWidth | string | width to be converted | ||
2 | nParent | node | parent to get the with for (required for relative widths) - optional |
iWidth width in pixels
Create a new cookie with a value to store the state of a table
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | sName | string | name of the cookie to create | ||
2 | sValue | string | the value the cookie should take | ||
3 | iSecs | int | duration of the cookie | ||
4 | sBaseName | string | sName is made up of the base + file name - this is the base | ||
5 | fnCallback | function | User definable function to modify the cookie |
Create a new TR element (and it's TD children) for a row
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | iRow | int | Row to consider |
Convert raw data into something that the user can search on
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | sData | string | data to be modified | ||
2 | sType | string | data type |
search string
Take an array of integers (index array) and remove a target integer (value - not the key!)
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | a | array | Index array to target | ||
2 | iTarget | int | value to find |
Use the DOM source to create up an array of header cells. The idea here is to create a layout grid (array) of rows x columns, which contains a reference to the cell that that point in the grid (regardless of col/rowspan), such that any column / row could be removed and the new grid constructed
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | array | {object} aLayout Array to store the calculated layout in | |||
2 | nThead | node | The header/footer element for the table |
Get the sort type based on an input string
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | sData | string | data we wish to know the type of |
type (defaults to 'string' if no type can be detected)
Insert the required TR nodes into the table for display
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Draw the header (or footer) element based on the column visibility states. The methodology here is to use the layout array from _fnDetectHeader, modified for the instantaneous column visibility, to construct the new layout. The grid is traversed over cell at a time in a rows x columns grid fashion, although each cell insert can cover multiple elements in the grid - which is tracks using the aApplied array. Cell inserts in the grid will only occur where there isn't already a cell in that position.
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | array | {objects} aoSource Layout array from _fnDetectHeader | |||
3 | bIncludeHidden | boolean | Optional | false | If true then include the hidden columns in the calc, |
scape a string such that it can be used in a regular expression
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | sVal | string | string to escape |
escaped string
Extend objects - very similar to jQuery.extend, but deep copy objects, and shallow copy arrays. The reason we need to do this, is that we don't want to deep copy array init values (such as aaSorting) since the dev wouldn't be able to override them, but we do want to deep copy arrays.
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oOut | object | Object to extend | ||
2 | oExtender | object | Object from which the properties will be applied to oOut |
oOut Reference, just for convenience - oOut === the return.
Create a wrapper function for exporting an internal functions to an external API.
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | sFunc | string | API function name |
wrapped function
Generate the node required for filtering text
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Filter control element
Generate the node required for the info display
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Information element
Generate the node required for user display length changing
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Display length feature node
Generate the node required for default pagination
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Pagination feature node
Generate the node required for the processing node
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Processing element
Add any control elements for the table - specifically scrolling
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Node to add to the DOM
Filter the data table based on user input and draw the table
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | sInput | string | string to filter on | ||
3 | iForce | int | optional - force a research of the master array (1) or not (undefined or 0) | ||
4 | bRegex | bool | treat as a regular expression or not | ||
5 | bSmart | bool | perform smart filtering or not | ||
6 | bCaseInsensitive | bool | Do case insenstive matching or not |
Filter the table on a per-column basis
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | sInput | string | string to filter on | ||
3 | iColumn | int | column to filter | ||
4 | bRegex | bool | treat search string as a regular expression or not | ||
5 | bSmart | bool | use smart filtering or not | ||
6 | bCaseInsensitive | bool | Do case insenstive matching or not |
Filter the table using both the global filter and column based filtering
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | oSearch | object | search information | ||
3 | iForce | int | Optional | force a research of the master array (1) or not (undefined or 0) |
Build a regular expression object suitable for searching a table
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | sSearch | string | string to search for | ||
2 | bRegex | bool | treat as a regular expression or not | ||
3 | bSmart | bool | perform smart filtering or not | ||
4 | bCaseInsensitive | bool | Do case insensitive matching or not |
constructed object
Apply custom filtering functions
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Read in the data from the target table from the DOM
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Get the data for a given cell from the internal cache, taking into account data mapping
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | iRow | int | aoData row id | ||
3 | iCol | int | Column index | ||
4 | sSpecific | string | data get type ('display', 'type' 'filter' 'sort') |
Cell data
Get an array of column indexes that match a given property
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | sParam | string | Parameter in aoColumns to look for - typically bVisible or bSearchable |
Array of indexes with matched properties
Return an array with the full table data
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
array {array} aData Master data array
Get the maximum strlen for each data column
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | iCol | int | column of interest |
max string length for each column
Return a function that can be used to get data from a source object, taking into account the ability to use nested objects as a source
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | mSource | string | int | function | The data source for the object |
Data get function
Get an array of data for a given row from the internal data cache
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | iRow | int | aoData row id | ||
3 | sSpecific | string | data get type ('type' 'filter' 'sort') | ||
4 | aiColumns | array | Array of column indexes to get data from |
Data array
Return an flat array with all TD nodes for the table, or row
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | iIndividualRow | int | Optional | aoData index to get the nodes for - optional if not given then the return array will contain all nodes for the table |
TD array
Return an array with the TR nodes for the table
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
TR array
Get an array of unique th elements, one for each column
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | nHeader | node | automatically detect the layout from this node - optional | ||
3 | aLayout | array | thead/tfoot layout from _fnDetectHeader - optional |
array {node} aReturn list of unique th's
Get the widest node
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | iCol | int | column of interest |
widest table node
Draw the table for the first time, adding all required features
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | json | object | Optional | JSON from the server that completed the table, if using Ajax source with client-side processing (optional) |
Draw the table for the first time, adding all required features
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Language compatibility - when certain options are given, and others aren't, we need to duplicate the values over, in order to provide backwards compatibility with older language files.
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Attempt to load a saved table state from a cookie
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | oInit | object | DataTables init object so we can override settings |
Log an error message
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | iLevel | int | log error messages, or display them to the user | ||
3 | sMesg | string | error message |
See if a property is defined on one object, if so assign it to the other object
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oRet | object | target object | ||
2 | oSrc | object | source object | ||
3 | sName | string | property | ||
4 | sMappedName | string | Optional | name to map too - optional, sName used if not given |
Take a TD element and convert it into a column data index (not the visible index)
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | iRow | int | The row number the TD/TH can be found in | ||
3 | n | node | The TD/TH element to find |
index if the node is found, -1 if not
Take a TR element and convert it to an index in aoData
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | n | node | the TR element to find |
index if the node is found, null if not
Alter the display settings to change the page
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | mAction | string | int | Paging action to take: "first", "previous", "next" or "last" or page number to jump to (integer) |
true page has changed, false - no change (no effect) eg 'first' on page 1
Display or hide the processing indicator
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | bShow | bool | Show the processing indicator (true) or not (false) |
Read an old cookie to get a cookie with an old table state
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | sName | string | name of the cookie to read |
contents of the cookie - or null if no cookie with that name found
Redraw the table - taking account of the various features which are enabled
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Call the developer defined fnRender function for a given cell (row/column) with the required parameters and return the result.
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | iRow | int | aoData index for the row | ||
3 | iCol | int | aoColumns index for the column |
Return of the developer's fnRender function
Figure out how to reorder a display list
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
array {int} aiReturn index list for reordering
Save the state of a table in a cookie such that the page can be reloaded
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Get the width of a scroll bar in this browser being used
width in pixels
Update the various tables for resizing. It's a bit of a pig this function, but basically the idea to: 1. Re-create the table inside the scrolling div 2. Take live measurements from the DOM 3. Apply the measurements 4. Clean up
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | o | object | dataTables settings object |
Node to add to the DOM
Adjust a table's width to take account of scrolling
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | n | node | table node |
Add Ajax parameters from plug-ins
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | array | {objects} aoData name/value pairs to send to the server |
Set the value for a specific cell, into the internal data cache
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | iRow | int | aoData row id | ||
3 | iCol | int | Column index | ||
4 | val | * | Value to set |
Return a function that can be used to set data from a source object, taking into account the ability to use nested objects as a source
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | mSource | string | int | function | The data source for the object |
Data set function
Return the settings object for a particular table
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | nTable | node | table we are using as a dataTable |
Settings object - or null if not found
Change the order of the table
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | bApplyClasses | bool | optional - should we apply classes or not |
Attach a sort handler (click) to a node
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | nNode | node | node to attach the handler to | ||
3 | iDataIndex | int | column sorting index | ||
4 | fnCallback | function | Optional | callback function |
Set the sorting classes on the header, Note: it is safe to call this function when bSort and bSortClasses are false
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Append a CSS unit (only if required) to a string
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | aArray1 | array | first array | ||
2 | aArray2 | array | second array |
0 if match, 1 if length is different, 2 if no match
Update the information elements in the display
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
Get the number of visible columns
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object |
i the number of visible columns
Covert the index of a visible column to the index in the data array (take account of hidden columns)
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | oSettings | object | dataTables settings object | ||
2 | iMatch | int | Visible column index to lookup |
i the data index