ColReorder : fnGetOrder
ColReorder : fnGetOrder
I just created the fnGetOrder method based on chentao1006's work (see the link below) to get the current order of the columns (based on the initial order) for the plugin ColReorder.
It returns an array of int. It can be useful for personnal state saving ;)
[code]
ColReorder.prototype = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Public methods
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
//...
"fnGetOrder": function()
{
var initOrder= [];
for(var i = 0, iLen=this.s.dt.aoColumns.length; i < iLen; i++ ) {
initOrder[i] = this.s.dt.aoColumns[i]._ColReorder_iOrigCol;
}
return initOrder;
},
//....
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Static functions
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
//...
ColReorder.fnSetOrder = function ( oTable, a )
{
for ( var i=0, iLen=ColReorder.aoInstances.length ; i
It returns an array of int. It can be useful for personnal state saving ;)
[code]
ColReorder.prototype = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Public methods
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
//...
"fnGetOrder": function()
{
var initOrder= [];
for(var i = 0, iLen=this.s.dt.aoColumns.length; i < iLen; i++ ) {
initOrder[i] = this.s.dt.aoColumns[i]._ColReorder_iOrigCol;
}
return initOrder;
},
//....
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Static functions
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
//...
ColReorder.fnSetOrder = function ( oTable, a )
{
for ( var i=0, iLen=ColReorder.aoInstances.length ; i
This discussion has been closed.
Replies
Allan