Filter on a list box

Filter on a list box

jankejanke Posts: 19Questions: 0Answers: 0
edited March 2010 in Bug reports
I want to filter with a list box on the head
my code
[code]
$("thead select").change( function () {
oTable.fnFilter( this.value, $("thead input").index(this) );
});
[/code]
This occurs error on line 1191 aoPreSearchCols Null not an object
I resolve this By this code
[code]
$('#composant_sensible').change( function () {
oTable.fnFilter( this.value,2);
});
[/code]
Where composant_sensible is the id of my selectbox
But pearheaps a good idea to integrate to datatable select box on the head or footer.

Replies

  • allanallan Posts: 63,491Questions: 1Answers: 10,470 Site admin
    There isn't a huge difference between your two code blocks. Does '$("thead input").index(this)' return '2' as you would expect? Should it be 'thead select' rather than 'input'?

    Allan
This discussion has been closed.