diff --git a/api/fnAddTr.js b/api/fnAddTr.js index 78f4eec..503c74d 100644 --- a/api/fnAddTr.js +++ b/api/fnAddTr.js @@ -14,27 +14,40 @@ $.fn.dataTableExt.oApi.fnAddTr = function ( oSettings, nTr, bRedraw ) { { bRedraw = true; } - + var nTds = nTr.getElementsByTagName('td'); if ( nTds.length != oSettings.aoColumns.length ) { alert( 'Warning: not adding new TR - columns and TD elements must match' ); return; } - + var aData = []; + var aInvisible = []; for ( var i=0 ; i= 0 ; i-- ) + { + oSettings.aoData[iIndex]._anHidden[ i ] = nTds[aInvisible[i]]; + nTr.removeChild( nTds[aInvisible[i]] ); + } + + // Redraw if ( bRedraw ) { this.oApi._fnReDraw( oSettings );