oColumnFilterWidgets on multiple tables - aiExclude issue

oColumnFilterWidgets on multiple tables - aiExclude issue

McCoRmIcKMcCoRmIcK Posts: 2Questions: 0Answers: 0
edited February 2013 in Plug-ins
hello

i try to use the oColumnFilterWidgets plugin on multiple tables. everything works fine, but when i add aiExclude it will only affect the first table.

here is an example http://dpl.sportwheels.de/liga/test.html

Replies

  • essexstephessexsteph Posts: 57Questions: 0Answers: 0
    I think it's because you're initialising both tables together. Try giving each table an id, e.g.

    [code]

    ...



    ...

    [/code]

    ... and then initialising each table separately by id

    [code]
    var oTable1 = $('#table1').dataTable( {
    "sDom": 'W<"clear">t',
    "oColumnFilterWidgets": {
    "aiExclude": [ 1 ]
    }

    var oTable2 = $('#table2').dataTable( {
    "sDom": 'W<"clear">t',
    "oColumnFilterWidgets": {
    "aiExclude": [ 1 ]
    }
    [/code]

    Obviously you'll have to change the rest of your javascript to handle each table separately.

    Steph
  • McCoRmIcKMcCoRmIcK Posts: 2Questions: 0Answers: 0
    this will work, but my example is just a small piece of my datatables code.
    would be fine to have a better solution
This discussion has been closed.