FixedColumns V2 - issue in data display.
FixedColumns V2 - issue in data display.
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.
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.
This discussion has been closed.
Replies
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
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.