individual column filtering example issue

individual column filtering example issue

RiemersRiemers Posts: 2Questions: 0Answers: 0
edited August 2013 in General
In the example on : http://www.datatables.net/examples/api/multi_filter_select.html

It states that this part needs to be there:
[code] $("tfoot th").each( function ( i ) {
this.innerHTML = fnCreateSelect( oTable.fnGetColumnData(i) );
$('select', this).change( function () {
oTable.fnFilter( $(this).val(), i );
} );
} );[/code]

However, my source is from ajax. So i would see my select boxes but no data is in there.

I fixed this by adding the entry with the fnInitComplete:

[code] "fnInitComplete" : function(){
/* Add a select menu for each TH element in the table footer */
$("tfoot th").each( function ( i ) {
this.innerHTML = fnCreateSelect( oTable.fnGetColumnData(i) );
$('select', this).change( function () {
oTable.fnFilter( $(this).val(), i );
});
});
}[/code]

But now my select boxes are filled but i cannot click anywhere in my datatables. Selecting something from the dropdown also does not change my view.

So i know i am close, but i am missing something. Why cant i interact with it anymore?

Using an ajax as my source btw. The data is correct and working without the filtering.

Thanks for any help.

Replies

  • RiemersRiemers Posts: 2Questions: 0Answers: 0
    Do i need to add more details? , still cant find out what i am doing wrong.
  • RiemersRiemers Posts: 2Questions: 0Answers: 0
    Does a question like this fall only under priority support? A reply with "your stupid, read the docs" would also help if i am actually that close if its too simple..
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    edited September 2013
    Can you link use to the page please? That looks like it should work okay to me - and is more or less exactly what I would have suggested.

    Allan
This discussion has been closed.