FixedColumns V2 - issue in data display.

FixedColumns V2 - issue in data display.

kandykandy Posts: 3Questions: 0Answers: 0
edited January 2012 in Plug-ins
I am using Datatables 1.8.1 and FixedColumns 2.0.1

Datatable is correctly rendering the data without using FixedColumns. But when I use the FixedColumns plug-in , it simply throws an error " invlaid argument" when I try to initialise the FixedColumns. attaching the sample code below.

displaySample = function () {
$('#'+destinationDiv).css({width: '98%', margin: '0'}); //looks better for reports
$('#'+destinationDiv).html( 'TridentInternet Explorer 5.0Win 95+5CTridentInternet Explorer 5.0Win 95+5CTridentInternet Explorer 5.0Win 95+5CTridentInternet Explorer 5.0Win 95+5CTridentInternet Explorer 5.0Win 95+5CTridentInternet Explorer 5.0Win 95+5CTridentInternet Explorer 5.0Win 95+5CTridentInternet Explorer 5.0Win 95+5C' );

var oTable = $('#example').dataTable( {
"sScrollX": "100%",
"sScrollXInner": "150%",
"bScrollCollapse": true
} );

new FixedColumns(oTable); // When I add this line, it throws the error.
return oTable;
};

Anyone have idea on what is wrong here?

Thanks
Kandy.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Hi Kandy,

    First thing I would suggest is updating to 1.8.2 - however, it should be working as can be seen in this example: http://datatables.net/release-datatables/extras/FixedColumns/index.html .

    Can you link us to your example please?

    Thanks,
    Allan
  • kandykandy Posts: 3Questions: 0Answers: 0
    Thanks Allan for the quick reply.

    After updating to 1.8.2 issue remains. Unfortunately , I cant provide the application link. But pretty much I am calling the function initSampleDataTable() from a html link. this method populates the DIV with the content.

    Below is the code snippet.

    function initSampleDataTable() {
    displaySample();

    //This is to enable automatic sorting of first column
    //$('#example thead th').eq(0).trigger('click');
    hideHomePage();//show loaded current page.
    DataPortal.currentTable.fnAdjustColumnSizing();
    }

    var displaySample = function () {
    destinationDiv = 'currentPage';
    $('#'+destinationDiv).css({width: '98%', margin: '0'}); //looks better for reports
    $('#'+destinationDiv).html( 'TridentInternet Explorer 5.0Win 95+5CTridentInternet Explorer 5.0Win 95+5CTridentInternet Explorer 5.0Win 95+5CTridentInternet Explorer 5.0Win 95+5CTridentInternet Explorer 5.0Win 95+5CTridentInternet Explorer 5.0Win 95+5CTridentInternet Explorer 5.0Win 95+5CTridentInternet Explorer 5.0Win 95+5C' );
    var dtTable = $('#example').dataTable( {
    "bJQueryUI": true,
    "sScrollX": "100%",
    "sScrollXInner": "150%",
    "bScrollCollapse": true
    } );
    DP.log("Test123");
    new FixedColumns(dtTable);
    DataPortal.currentTable = dtTable;
    };

    What am I doing wrong here? Still says ERROR: INVALID ARGUMENT at line 529.

    Thanks
    Kandy.
  • kandykandy Posts: 3Questions: 0Answers: 0
    any thoughts to this issue?
This discussion has been closed.