Disable sorting for specific rows

Disable sorting for specific rows

tudrotudro Posts: 1Questions: 1Answers: 0

Hello,

I needed the last row to not be sortable, so I found this post https://datatables.net/forums/discussion/comment/33971/#Comment_33971

It doesn't work anymore because of the new api. If somebody still needs this, in order to work you need to change the "//DATATABLE INITIALIZATION CODE" in:

jQuery.fn.dataTableExt.afnSortData['dom-text'] = function ( oSettings, iColumn ) { var aData = []; this.api().column( iColumn, {order:'index'} ).nodes().map( function ( td, col ) { var cid = $(td).attr('id'); var val = $(td).html(); if (cid == "sortfalse") { aData.push( "sortfalse" ); } else { aData.push( val ); } } ); return aData; }

That topic is closed so i couldn't add it there. It is ok if somebody could delete my post and just add it at the end of that discussion.

This discussion has been closed.