Error while doing invalidate the rows using rows().invalidate() having pagination.

Error while doing invalidate the rows using rows().invalidate() having pagination.

raul_lfcraul_lfc Posts: 21Questions: 1Answers: 0
edited March 2014 in DataTables 1.10
Hi Allan,

I came across one issue when I try to invalidate all my row records present using
[code]
var oTable=$('#example').DataTable();
oTable.rows().invalidate().
[/code]

I have pagination in my dataTable and initially it is displaying 100 records. When we call oTable.rows().invalidate(), I am getting error on the 100th (2nd Page 1st Row ) row as "TypeError: Cannot read property 'length' of null" in the function _fnInvalidateRow()
[code]

function _fnInvalidateRow( settings, rowIdx, src, column )
{
var row = settings.aoData[ rowIdx ];
var i, ien;

// Are we reading last data from DOM or the data object?
if ( src === 'dom' || ((! src || src === 'auto') && row.src === 'dom') ) {
// Read the data from the DOM
row._aData = _fnGetRowElements( settings, row.nTr ).data;
}
else {
// Reading from data object, update the DOM
var cells = row.anCells; /* THIS CELL GETTING NULL FOR 100th ROW */

for ( i=0, ien=cells.length ; i

Replies

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    Excellent stuff - thank you for flagging this up and the test case. I've just committed the fix for this: https://github.com/DataTables/DataTablesSrc/commit/3034e3ba . The build repo is syncing now.

    Allan
This discussion has been closed.