Error while doing invalidate the rows using rows().invalidate() having pagination.
Error while doing invalidate the rows using rows().invalidate() having pagination.
raul_lfc
Posts: 21Questions: 1Answers: 0
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
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
This discussion has been closed.
Replies
Allan