How to filter by both textbox and combo box (select) ?

How to filter by both textbox and combo box (select) ?

gogo123456gogo123456 Posts: 4Questions: 0Answers: 0
edited October 2011 in DataTables 1.8
I want to filter individual column (add to header for example) by use both textbox and combo box (select input). In example page, there is only each seperately, I want mix both type in thead (or tfoot). So how can i do it ? Thank for every comment.

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    For the same columns? or are these for two different columns?

    In either case, the filters are calling fnFilter(), so there would be no conflict in using both approaches if they are for 2 different columns.

    If this is for the same column, I'm a little unsure how you intend to mix the combo and textbox values.
  • gogo123456gogo123456 Posts: 4Questions: 0Answers: 0
    In different column. I have solved it, it's similar with example, just use $('thead input, thead select') and it works like miracle :)
  • Snake85Snake85 Posts: 2Questions: 0Answers: 0
    I don't get it how you did it...

    For example I want the first column to be filtered by a textbox, the second and the third one by a select and the forth one by a textbox... How you do it?

    Thanks again...

    Samuele
This discussion has been closed.