FixedColumns: Scroll ok, but fixed column not?
FixedColumns: Scroll ok, but fixed column not?
Hi all together,
I just added horizontal scroll to my table successfully and now I'd like to fix the left column. I tried that usind the example here: http://datatables.net/release-datatables/extras/FixedColumns/themed.html
My code now looks like:
[code]$(document).ready(function () {
var saleTable = $('#tabs-3 table.display').dataTable({
"sScrollX": "100%",
"bScrollCollapse": true,
"oLanguage": {
"sSearch": "Global search:"
},
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": '<"H"Tfr>t<"F"ip>',
//"oSearch": {"bSmart": false},
"oTableTools": {
"sSwfPath": "modules/rfid/tools/jQueryUI/datatable/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [
"copy", "csv", "xls", "pdf"/*,{
"sExtends": "collection",
"sButtonText": "Save",
"aButtons": [ "csv", "xls", "pdf" ]
}*/
]
}
});
new FixedColumns( saleTable );
});[/code]
The scrolling works well, but the left column is not fixed. Autowidth is working properly like expected.
Am I doing something wrong? I'd be happy to hear your thoughts.
Cheers,
thowi
I just added horizontal scroll to my table successfully and now I'd like to fix the left column. I tried that usind the example here: http://datatables.net/release-datatables/extras/FixedColumns/themed.html
My code now looks like:
[code]$(document).ready(function () {
var saleTable = $('#tabs-3 table.display').dataTable({
"sScrollX": "100%",
"bScrollCollapse": true,
"oLanguage": {
"sSearch": "Global search:"
},
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": '<"H"Tfr>t<"F"ip>',
//"oSearch": {"bSmart": false},
"oTableTools": {
"sSwfPath": "modules/rfid/tools/jQueryUI/datatable/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [
"copy", "csv", "xls", "pdf"/*,{
"sExtends": "collection",
"sButtonText": "Save",
"aButtons": [ "csv", "xls", "pdf" ]
}*/
]
}
});
new FixedColumns( saleTable );
});[/code]
The scrolling works well, but the left column is not fixed. Autowidth is working properly like expected.
Am I doing something wrong? I'd be happy to hear your thoughts.
Cheers,
thowi
This discussion has been closed.
Replies
Allan
Thank you for your comments. I'll take a look at your code, thanks for that!
Also, here you can see the site where it occurs:
http://rfid.ocserv.de/
user: demo
pass: demo
After login click "RFID Product Management" and then click "view database content".
Cheers,
thowi
> ReferenceError: Can't find variable: FixedColumns
Are you including the FixedColumns JS file?
Now I included that. Console says:
ReferenceError: reference to undefined property $.browser
TypeError: $.browser is undefined
in FixedColumns.js.
Also the fact that I added 'new FixedColumns( saleTable );' crashed my jQueryUI accordion in tab "Update Database Content", which worked before. I don't know if this helps you, but maybe good 2 know:
[code]
$(document).ready(function () {
$( "#database_update" ).accordion({
heightStyle: "content"
});
});
[/code]
TypeError: anonymous function does not always return a value in FixedColumns.js
I now have many reference errors in dataTables.js - and the whole table crashed. Beside, FixedColumns seem not to work anyhow.
But the strange thing is: when resizing the browser window a little bit it disappears. Okay so far... but yes, left column is not being fixed.
I also tried specifying the FixedColumns a little bit by adding [code]{ "iLeftColumns": 1, "iRightColumns": 1 }[/code] to see if something is somehow happening.
Now the header of my left right column is shown left and fixed, but the content is not... interesting :)