From 65e9e86d9ea636901b7bfce73a0b8264d96638ca Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Thu, 18 Nov 2010 21:55:36 +0000 Subject: [PATCH] Updated: fnAdjustColumnSizing when called with 'false' as the first (and only) parameter will now apply the calculated column sizes to the table when scrolling is being used. This allows a non-Ajax update to occur if using server-side processing. --- media/js/jquery.dataTables.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 34a3592e..57b26834 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -2222,12 +2222,18 @@ */ this.fnAdjustColumnSizing = function ( bRedraw ) { - _fnAjustColumnSizing( _fnSettingsFromNode( this[_oExt.iApiIndex] ) ); + var oSettings = _fnSettingsFromNode(this[_oExt.iApiIndex]); + _fnAjustColumnSizing( oSettings ); if ( typeof bRedraw == 'undefined' || bRedraw ) { this.fnDraw( false ); } + else if ( oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "" ) + { + /* If not redrawing, but scrolling, we want to apply the new column sizes anyway */ + this.oApi._fnScrollDraw(oSettings); + } }; /*