DataTables – Excluding columns from sorting [no sort]

Excluding columns from sorting

Often a table will have columns which should be excluded from sorting because they contain inputs or other controls. To exclude a column from sorting add a "nosort" class to the table header cell:

   <th class="nosort">Don't sort this column</th>
   <th>Sort this column</th>
   <th>Sort this column</th>

In the configuration for that table indicate that columns with class "nosort" should be excluded from sorting:

    $("#mytable").dataTable($.extend(true, {}, dataTablesDefaults, {
        "aoColumnDefs": [
            { 'bSortable': false, 'aTargets': [ 'nosort' ] }

About selvam4win

I am Selvam. I am very jolly person and frank one.

Posted on December 16, 2014, in Uncategorized. Bookmark the permalink. Leave a comment.

Comments are closed.

%d bloggers like this: