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
73.1K
All Categories
56
Priority support
23K
Free community support
977
General
13
Announcements
2.4K
DataTables
6
DataTables 2
1.3K
DataTables 1.10
90
DataTables 1.9
35
DataTables 1.8
9
CloudTables
2.1K
Editor
2.8K
Extensions
20
AutoFill
301
Buttons
49
ColVis
28
DateTime
67
FixedColumns
49
FixedHeader
31
ColReorder
28
KeyTable
100
Responsive
22
RowReorder
40
Scroller
157
SearchBuilder
189
SearchPanes
101
Select
25
StateRestore
22
TableTools
210
Bug reports
65
Feature requests
97
Plug-ins
11
Blog
64
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