jquery - DataTables: how to reorder a column in datatables using Javascript or any function -


i using colreorder extension of datatables. , want rearrange column in table using function , not manually dragging column. know there function order() takes array parameter.

but method not move single column @ time has performance constraints when number of columns large

you have pass array new order:

var table = $('#table').datatable({ colreorder: true });  $('button#neworder').click(function() {     table.colreorder.order([3,4,2,0,1], true); }); 

see more details here https://datatables.net/reference/api/colreorder.order()


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -