Fixed columns disappear when scrolling down to the bottom of the rows
Fixed columns disappear when scrolling down to the bottom of the rows
kakacek
Posts: 3Questions: 0Answers: 0
Hello, I am trying to accomodate the DataTablesn and the FixedColumns plugins. Ignoring the fact that it is quite slow even on my i7/8GB MBP, everything seems to work, except of one issue:
When I scroll down the rows, almost down, the fixed columns dissapear.
To better understand me, I am adding the links to the two images - the first one shows the look just after the load of the page - and the second shows it after I scroll down...
http://old.betacontrol.cz/data/kk/blazek/2013-01-31_23-23-43.png
http://old.betacontrol.cz/data/kk/blazek/2013-01-31_23-24-23.png
The only way how to re-display the fixed columns is to refresh the page...
The component initialization code looks like this:
[code]$(document).ready(function() {
startListTable = $('#dataTable1').dataTable( {
"aoColumns": [
{"sTitle":"ID","sClass":"left","bSortable": true},
{"sTitle":"Příjmení","sClass":"left","bSortable": true},
{"sTitle":"Jméno","sClass":"left","bSortable": true},
{"sTitle":"Ročník","sClass":"left","bSortable": true},
{"sTitle":"Klub/Město","sClass":"left","bSortable": true},
{"sTitle":"Zaplaceno","sClass":"left","bSortable": true},
{"sTitle":"Registrace","sClass":"left","bSortable": true},
{"sTitle":"Trať","sClass":"left","bSortable": true},
{"sTitle":"Název team","sClass":"left","bSortable": true},
{"sTitle":"O pohár ředitelky ATVS Palestra","sClass":"left","bSortable": true},
{"sTitle":"Akademické MČR","sClass":"left","bSortable": true},
{"sTitle":"kola","sClass":"left","bSortable": true},
{"sTitle":"","sClass":"left","mRender":function(data,type,row){return data;},"bSortable": false},
{"sTitle":"","sClass":"left","mRender":function(data,type,row){return data;},"bSortable": false}],
"aaData": startListData,
//"sPaginationType": "full_numbers",
//"iDisplayLength": 100,
//"aLengthMenu": [10, 25, 50, 100, 1000],
"bScrollInfinite": true,
"bScrollCollapse": true,
"sScrollY": "300px",
"sScrollX": "100%",
"sScrollXInner": "300%",
"oLanguage": {
"sLengthMenu": "Zobrazit _MENU_ záznamů na stránku",
"sZeroRecords": "Žádné záznamy",
"sInfo": "Zobrazeno _START_ do _END_ z _TOTAL_ záznamů",
"sInfoEmpty": "Zobrazeno 0 do 0 z 0 záznamů",
"sSearch": "Filtr: ",
"oPaginate": {
"sFirst": "<<",
"sPrevious": "<",
"sNext": ">",
"sLast": ">>"
}
},
"fnRowCallback": function(nRow) {
if(nRow.cells[2]) nRow.cells[2].noWrap = true;
return nRow;
}
} );
new FixedColumns(startListTable, {
"iLeftColumns": 4,
"iLeftWidth": 350
} );
} );[/code]
When I scroll down the rows, almost down, the fixed columns dissapear.
To better understand me, I am adding the links to the two images - the first one shows the look just after the load of the page - and the second shows it after I scroll down...
http://old.betacontrol.cz/data/kk/blazek/2013-01-31_23-23-43.png
http://old.betacontrol.cz/data/kk/blazek/2013-01-31_23-24-23.png
The only way how to re-display the fixed columns is to refresh the page...
The component initialization code looks like this:
[code]$(document).ready(function() {
startListTable = $('#dataTable1').dataTable( {
"aoColumns": [
{"sTitle":"ID","sClass":"left","bSortable": true},
{"sTitle":"Příjmení","sClass":"left","bSortable": true},
{"sTitle":"Jméno","sClass":"left","bSortable": true},
{"sTitle":"Ročník","sClass":"left","bSortable": true},
{"sTitle":"Klub/Město","sClass":"left","bSortable": true},
{"sTitle":"Zaplaceno","sClass":"left","bSortable": true},
{"sTitle":"Registrace","sClass":"left","bSortable": true},
{"sTitle":"Trať","sClass":"left","bSortable": true},
{"sTitle":"Název team","sClass":"left","bSortable": true},
{"sTitle":"O pohár ředitelky ATVS Palestra","sClass":"left","bSortable": true},
{"sTitle":"Akademické MČR","sClass":"left","bSortable": true},
{"sTitle":"kola","sClass":"left","bSortable": true},
{"sTitle":"","sClass":"left","mRender":function(data,type,row){return data;},"bSortable": false},
{"sTitle":"","sClass":"left","mRender":function(data,type,row){return data;},"bSortable": false}],
"aaData": startListData,
//"sPaginationType": "full_numbers",
//"iDisplayLength": 100,
//"aLengthMenu": [10, 25, 50, 100, 1000],
"bScrollInfinite": true,
"bScrollCollapse": true,
"sScrollY": "300px",
"sScrollX": "100%",
"sScrollXInner": "300%",
"oLanguage": {
"sLengthMenu": "Zobrazit _MENU_ záznamů na stránku",
"sZeroRecords": "Žádné záznamy",
"sInfo": "Zobrazeno _START_ do _END_ z _TOTAL_ záznamů",
"sInfoEmpty": "Zobrazeno 0 do 0 z 0 záznamů",
"sSearch": "Filtr: ",
"oPaginate": {
"sFirst": "<<",
"sPrevious": "<",
"sNext": ">",
"sLast": ">>"
}
},
"fnRowCallback": function(nRow) {
if(nRow.cells[2]) nRow.cells[2].noWrap = true;
return nRow;
}
} );
new FixedColumns(startListTable, {
"iLeftColumns": 4,
"iLeftWidth": 350
} );
} );[/code]
This discussion has been closed.
Replies
Allan
So I created the static extract which behaves that bad and published it here:
http://old.betacontrol.cz/data/kk/blazek/DataTablesTest/datatablestest.html
Allan
BTW: I think that was visible from my original post...
Anyway thank you again for your effort.
Please consider this bug report as closed (as a feature not a bug)...
Allan