Multiple tables with one fn.Filter()

Multiple tables with one fn.Filter()

laura_ccslaura_ccs Posts: 3Questions: 0Answers: 0
edited August 2012 in General
Hey all!
Im dying here with a problem. I have this: fTable = $('.filter').dataTable({........}); and in my page there is a for{ } to create multiple tables with the class="filter". The problem is, in the for{ } I have a button to filter the table, something like this:

< ..... onclick="fTable.fnFilter('^'+'<%= menuRow.getTypeName() %>'+'$',1,true);">

because I need to filter the table by <%= menuRow.getTypeName() %> which changes in the for { }. I thought that line would change every table I have, but because I show only one, thats all I need. Is there a way to fn.Filter() multiple tables at once?
The console said this: TypeError: g is null
Sorry for my english :)
Laura

Replies

  • laura_ccslaura_ccs Posts: 3Questions: 0Answers: 0
    edited August 2012
    Help anybody?

    I think fTable is a list and I need an instance, but I dont know how it works. fTable[i] wont work.
  • laura_ccslaura_ccs Posts: 3Questions: 0Answers: 0
    edited August 2012
    OK I used fnFilterAll but the filter will not work unless I click something in the table! Why?
    Only the last one is automatic.
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    We would need a link to see why that isn't working - fnFilterAll should be what is needed.

    Allan
This discussion has been closed.