oDT.fnSettings() is null with FixedColumns

oDT.fnSettings() is null with FixedColumns

RollermaniacRollermaniac Posts: 2Questions: 0Answers: 0
edited April 2012 in FixedHeader
Hey. I'm trying to use fixedColumns with that code :

var tableFixed = $('#tableFixed').dataTable(
{
"sScrollY": "300px",
"sScrollX": "100%",
"sScrollXInner": "150%",
"bScrollCollapse": true,
"bPaginate": false });

new FixedColumns(tableFixed);

But it doesn't work and i get the error message : oDT.fnSettings() is null
Does that mean that my table isn't correctly built ?




Header 1
Header 2
Header 3
Header 4
Header 5
Header 6
Header 7
Header 8
Header 9
Header 10




Text 1
Text 2
Text 3
Text 4
Text 5
Text 6
Text 7
Text 8
Text 9
Text 10


Text 1
Text 2
Text 3
Text 4
Text 5
Text 6
Text 7
Text 8
Text 9
Text 10


Text 1
Text 2
Text 3
Text 4
Text 5
Text 6
Text 7
Text 8
Text 9
Text 10


Text 1
Text 2
Text 3
Text 4
Text 5
Text 6
Text 7
Text 8
Text 9
Text 10




Text 1
Text 2
Text 3
Text 4
Text 5
Text 6
Text 7
Text 8
Text 9
Text 10




Text 1
Text 2
Text 3
Text 4
Text 5
Text 6
Text 7
Text 8
Text 9
Text 10

Replies

  • allanallan Posts: 54,523Questions: 1Answers: 8,525 Site admin
    Looks like it should work okay - can you confirm that you are using the latest versions of DataTables and FixedColumns? Can you link me to an example page which is showing the problem please?

    Allan
  • RollermaniacRollermaniac Posts: 2Questions: 0Answers: 0
    I download DataTables and FixedColumns from this site yesterday, so i guess i have the latests versions.

    I'm sorry I can't link an example page but here is the entire code.

    The jquery.js is the one you give in your dl package. And they're all in the same package of my html.

    [code]
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">





    Test FixedTable

    var myDataTable = $('#tableFixed').dataTable(
    {
    "sScrollY": "300px",
    "sScrollX": "100%",
    "sScrollXInner": "150%",
    "bScrollCollapse": true,
    "bPaginate": false });
    new FixedColumns(myDataTable);




    th
    {
    width : 500px;
    height : 200px;
    background-color : yellow;
    }
    td
    {
    width : 500px;
    height : 200px;
    }








    Header 1
    Header 2




    Text 1
    Text 2


    Text 1
    Text 2


    Text 1
    Text 2



    Text 1
    Text 2



    Text 1
    Text 2




    Text 1
    Text 2






    [/code]
  • allanallan Posts: 54,523Questions: 1Answers: 8,525 Site admin
    You need to put your code either at the bottom of the BODY tag or in an 'unload' function... It is trying to get the DOM element before it is available. See: http://api.jquery.com/ready/

    Allan
This discussion has been closed.