Two FixedColumns dataTables on one page

Two FixedColumns dataTables on one page

SetekSetek Posts: 4Questions: 0Answers: 0
edited December 2013 in Bug reports
For some reason, this doesn't seem to work. I am able to get two DataTables on one page, but the FixedColumns will only run on the first one.

I've made a jsFiddle to show how FixedColumns only runs on the first table:

http://jsfiddle.net/uh8Tn/

My code is:

[code]
var oTable = $('.racetable').dataTable({
"sScrollX": "600px",
"sScrollY": "150px",
"bDestroy": true,
"bScrollCollapse": true,
"bPaginate": false,
"bFilter": false,
"bInfo": false,
"bSort": false
});

new FixedColumns(oTable, {
"iLeftColumns": 2
});
[/code]

Should I be doing this some other way?

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    An oversight in the FixedColumns API I'm afraid. You need to initialise the tables individually as FixedColumns tables: http://jsfiddle.net/uh8Tn/1/ .

    I've opened an issue for this here: https://github.com/DataTables/FixedColumns/issues/14

    Allan
This discussion has been closed.