fnFilter getting the correct index

fnFilter getting the correct index

ririckririck Posts: 11Questions: 0Answers: 0
edited January 2012 in General
I am trying to follow the example as in http://datatables.net/release-datatables/examples/api/multi_filter.html and everything works.
To get the column index I use
$("tfoot input").keyup( function () {
/* Filter on the column (the index) of this element */
oTable.fnFilter( this.value, $("tfoot input").index(this) );
} );

When I use the show/hide column filter (ColVis )the function that gets the column index doesn't work correctly.

Is there a workaround?

Thanks

Replies

  • allanallan Posts: 63,540Questions: 1Answers: 10,476 Site admin
    Absolutely - use this plug-in to convert from the visible column index to the data column index: http://datatables.net/plug-ins/api#fnVisibleToColumnIndex

    Allan
This discussion has been closed.