jquery - Fixed top row when sort in datatable -


i'm building website storing files , here ui enter image description here

when sort, ".." row bottom row , it's undesirable effects.
i've tried this solution seem likes used old api.
can show me how fix it?
in advance

update here code initialize datatable

var tablefolder = $('#tablefolder').datatable({     columndefs: [         {"width": "50%", "targets": 0},         {"width": "25%", "targets": 1},         {"width": "25%", "targets": 2}     ],     aasorting: [],     deferrender: true,     scrolly: 560,     scrollcollapse: true,     scroller: true,     paging: false,     info: false,     searching: false,     ajax: url,     fncreatedrow: function (nrow, adata, idataindex) {         $(nrow).attr('id', adata[3]);     } }); 

this has answer @ datatables blog.

add plugin page

//cdn.datatables.net/plug-ins/1.10.16/sorting/absolute.js 

if want order datatable , keep rows text 'unknown' in first column @ top of datatable.

var nametype = $.fn.datatable.absoluteorder( 'unknown' );  $('#mytable').datatable( {     columndefs: [         { targets: 0, type: nametype }     ] } ); 

Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo