Wednesday, 15 July 2015

jquery - How to disable sorting from some specif rows in DataTables -



jquery - How to disable sorting from some specif rows in DataTables -

i've used table. need first row of tbody(which displays average number of columns) should not sorted, mean row should in top always(below thead) this: . how can this? search solution on google , find set row on thead or that. but, if seek set row on place, seems complex me. so, there way set class on row , disabling sortng on classed row? like: <tr class="average no-sort"></tr>

fiddle

i create sec tbody in table , move rows need persist in tbody so:

initcomplete: function() { var self = this; var api = this.api(); api.rows().eq(0).each(function(index) { var row = api.row(index); if (row.data()...) { // status here var $row_to_persist = $(row.node()); var $clone = $row_to_persist .clone(); $(self).find('tbody:last').append($clone); $total_row.remove(); row.remove(); api.draw(); } }); }

jquery css datatable

No comments:

Post a Comment