FnFilter And ColVis - Filtering the hidden column

FnFilter And ColVis - Filtering the hidden column

happytakashihappytakashi Posts: 3Questions: 0Answers: 0
edited April 2012 in DataTables 1.9
Hi

I would like to filter the hidden column after using colvis plugin.
Even through i get the correct index for the hidden column, i was
still unable to get the correct result.

Is it possible to filter hidden column using fnFilter?

From
takashi

Replies

  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin
    Yes indeed you can do that. The column index you pass into fnFilter is the column data index (i.e. call columns, regardless of visibility) while it might be that you are using the visible column index. You need to convert from one to the other - there is a plug-in function for exactly that: http://datatables.net/plug-ins/api#fnVisibleToColumnIndex

    Allan
This discussion has been closed.