| 4 |
lars |
1 |
/**
|
|
|
2 |
* Update the internal data for a `dt-tag tr` element based on what is used in the
|
|
|
3 |
* DOM. You will likely want to call fnDraw() after this function.
|
|
|
4 |
*
|
|
|
5 |
* DataTables 1.10+ has this ability built-in through the
|
|
|
6 |
* `dt-api row().invalidate()` method. As such this method is marked deprecated,
|
|
|
7 |
* but is available for use with legacy version of DataTables. Please use the
|
|
|
8 |
* new API if you are used DataTables 1.10 or newer.
|
|
|
9 |
*
|
|
|
10 |
* @name fnDataUpdate
|
|
|
11 |
* @summary Update DataTables cached data from the DOM
|
|
|
12 |
* @author Lior Gerson
|
|
|
13 |
* @deprecated
|
|
|
14 |
*
|
|
|
15 |
* @param {node} nTr `dt-tag tr` element to get the data from
|
|
|
16 |
* @param {integer} iRowIndex Row's position in the table (`fnGetPosition`).
|
|
|
17 |
*/
|
|
|
18 |
|
|
|
19 |
jQuery.fn.dataTableExt.oApi.fnDataUpdate = function ( oSettings, nRowObject, iRowIndex )
|
|
|
20 |
{
|
|
|
21 |
jQuery(nRowObject).find("TD").each( function(i) {
|
|
|
22 |
var iColIndex = oSettings.oApi._fnVisibleToColumnIndex( oSettings, i );
|
|
|
23 |
oSettings.oApi._fnSetCellData( oSettings, iRowIndex, iColIndex, jQuery(this).html() );
|
|
|
24 |
} );
|
|
|
25 |
};
|