Dynamically set customized columns order support in ColReorder
Dynamically set customized columns order support in ColReorder

I just added following code into ColReorder.js so I can dynamically set columns order as I wish.
[code]
ColReorder.prototype = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Public methods
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
.............
"fnSetOrder": function ( a )
{
var resort = fnInvertKeyValues( a )
this._fnOrderColumns( resort );
},
.............
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Static functions
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
ColReorder.fnSetOrder = function ( oTable, a )
{
for ( var i=0, iLen=ColReorder.aoInstances.length ; i
[code]
ColReorder.prototype = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Public methods
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
.............
"fnSetOrder": function ( a )
{
var resort = fnInvertKeyValues( a )
this._fnOrderColumns( resort );
},
.............
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Static functions
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
ColReorder.fnSetOrder = function ( oTable, a )
{
for ( var i=0, iLen=ColReorder.aoInstances.length ; i
This discussion has been closed.
Replies
Allan
Of course okay!
Thanks again!
Tao
2 Lines of code after the script change.
ColReorder.fnReset(dataTable);
ColReorder.fnSetOrder(dataTable, colOrder);