The problem with 'draw' after upgrading from 1.9 to 1.10
The problem with 'draw' after upgrading from 1.9 to 1.10
Ale3
Posts: 1Questions: 1Answers: 0
Hi,
The problem is that '_fnDraw' ignores the child rows. And when using scrollY
and scrollCollapse
the table height is calculated incorrectly after adding child rows. columns.adjust()
solves the problem, but any operation of the sort or search calls the drawing function...
Here is an example.
I added some code to '_fnDraw':
if ( aiDisplay.length !== 0 )
{
var iStart = bServerSide ? 0 : iDisplayStart;
var iEnd = bServerSide ? oSettings.aoData.length : iDisplayEnd;
for ( var j=iStart ; j<iEnd ; j++ )
{
/*
* ...many rows of code...
*/
anRows.push( nRow );
iRowCount++;
/* added code */
if (aoData._details) {
for (var detIdx = 0, detLen = aoData._details.length; detIdx < detLen; detIdx++) {
anRows.push(aoData._details[detIdx]);
}
}
}
}
and it works, but maybe there is a more correct solution, which I did not find.
Sorry for bad English.
Ale3
This discussion has been closed.