DataTables
Advanced interaction
features for your tables.
Editor
Comprehensive editing
library for DataTables.
Manual
Download
Examples
Manual
Reference
Extensions
Plug-ins
Blog
Forums
Discussions
Sign In
Support
FAQs
Download
Purchase
≡
Show site navigation
oColumnFilterWidgets on multiple tables - aiExclude issue
oColumnFilterWidgets on multiple tables - aiExclude issue
McCoRmIcK
Posts: 2
Questions: 0
Answers: 0
February 2013
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
essexsteph
Posts: 57
Questions: 0
Answers: 0
February 2013
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
McCoRmIcK
Posts: 2
Questions: 0
Answers: 0
February 2013
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.
Sign In
·
Register
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Quick Links
Categories
Recent Discussions
Unanswered
Categories
74.3K
All Categories
56
Priority support
24K
Free community support
997
General
14
Announcements
2.5K
DataTables
79
DataTables 2
1.3K
DataTables 1.10
92
DataTables 1.9
35
DataTables 1.8
9
CloudTables
2.2K
Editor
2.8K
Extensions
20
AutoFill
310
Buttons
50
ColVis
30
DateTime
68
FixedColumns
50
FixedHeader
31
ColReorder
30
KeyTable
103
Responsive
23
RowReorder
42
Scroller
163
SearchBuilder
193
SearchPanes
107
Select
26
StateRestore
22
TableTools
220
Bug reports
67
Feature requests
100
Plug-ins
11
Blog
69
Web-site
Replies
[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
would be fine to have a better solution