From 12c81b8e6570a2b859e8584bb5429a5dedfed231 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Sat, 23 Oct 2010 17:36:55 +0100 Subject: [PATCH] Updated: Store a complete representation of the column visibility state in aoData[]._anHidden (i.e. put in nulls for elements which are visible) to make manipulation much easier. --- media/js/jquery.dataTables.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 0b51585c..b18bb58f 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -2576,6 +2576,7 @@ if ( oSettings.aoColumns[i].bVisible ) { oSettings.aoData[iThisIndex].nTr.appendChild( nTd ); + oSettings.aoData[iThisIndex]._anHidden[i] = null; } else { @@ -2738,6 +2739,10 @@ oSettings.aoData[iRow]._anHidden[iColumn] = nCell; nCell.parentNode.removeChild( nCell ); } + else + { + oSettings.aoData[iRow]._anHidden[iColumn] = null; + } } } }