Disable filtering on some column(s) - not all column(s)

Disable filtering on some column(s) - not all column(s)

kmskms Posts: 15Questions: 2Answers: 0
edited October 2014 in Free community support

With reference to the link http://datatables.net/reference/option/columnDefs, I can see that if you assign a class to the TH for columns you are able to disable filtering for that column in question.

Therefore I would like to know how easy it is to assign a class e.g. "prevent-sorting" to the TH columns in a table and then use that as the "targets:" to prevent filtering in that column.

I do have an onclick function which passes parameters within the function and wondered if that could be one of the reasons as to why the search results that I receive are not correct.

Answers

  • WoldereWoldere Posts: 17Questions: 3Answers: 2

    Can't you use something like

    "aoColumns": [{ "bVisible": true, "bSearchable": false, "bSortable": false},

  • kmskms Posts: 15Questions: 2Answers: 0
    edited October 2014

    I do not want to disable the search and sorting functionality altogether (or from the entire table), I only want to disable the search and sorting functionality from some of the columns in the table only.

This discussion has been closed.