Scroll to bottom with Fixed Columns
Scroll to bottom with Fixed Columns
redsfanman
Posts: 1Questions: 0Answers: 0
I believe I found a bug when using FixedColumns. When using the below initilization code, the rows become misaligned when I scroll all the way to the bottom of the table in Internet Explorer 8 (not sure about other versions), but it works perfectly in FireFox.
Here is my initialization code:
$(document).ready(function() {
$.getDocHeight = function(){
return Math.max(
$(document).height(),
$(window).height(),
/* For opera: */
document.documentElement.clientHeight
);
};
oTable = $('#stb').dataTable( {
"bProcessing": true,
"aaSorting": [[35,"desc"], [ 0, "asc" ]],
"bServerSide": false,
"bSortClasses": false,
"bAutoWidth": false,
"sScrollY": ($.getDocHeight()-133)+"px",
"sScrollX": "100%",
"sScrollXInner": "100%",
"sPaginationType": "full_numbers",
"iDisplayLength": 30,
"aLengthMenu": [[5, 10, 15, 20, 25, 30, 35, 40, 45, 50, -1], [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, "All"]],
"sDom": 'lpifrt',
"sAjaxSource": '/mainContent/stats/stb.php',
"bDeferRender": true,
"fnInitComplete": function() { //oSettings, json
new FixedColumns(oTable);
}
} );
} );
FOR AN EXAMPLE OF WHAT I'M TALKING ABOUT GO TO TO:
http://flbonline.com/indexNew.htm and then click on STATS on the left column. Try scrolling to the bottom in IE8 and you will see the rows become misaligned when you scroll all the way down. Try this in Firefox, and it works perfectly. The rows stay lined up.
Either way, I'm using this to replace Microsofts Tabular Data Control (databinding) that I used years ago when I first wrote this code. It worked great....but only in Internet Explorer. It is great to have something that works on multiple browswers! It seems to load a little slower, but offers a lot more built in options. You have created a great tool.
Here is my initialization code:
$(document).ready(function() {
$.getDocHeight = function(){
return Math.max(
$(document).height(),
$(window).height(),
/* For opera: */
document.documentElement.clientHeight
);
};
oTable = $('#stb').dataTable( {
"bProcessing": true,
"aaSorting": [[35,"desc"], [ 0, "asc" ]],
"bServerSide": false,
"bSortClasses": false,
"bAutoWidth": false,
"sScrollY": ($.getDocHeight()-133)+"px",
"sScrollX": "100%",
"sScrollXInner": "100%",
"sPaginationType": "full_numbers",
"iDisplayLength": 30,
"aLengthMenu": [[5, 10, 15, 20, 25, 30, 35, 40, 45, 50, -1], [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, "All"]],
"sDom": 'lpifrt',
"sAjaxSource": '/mainContent/stats/stb.php',
"bDeferRender": true,
"fnInitComplete": function() { //oSettings, json
new FixedColumns(oTable);
}
} );
} );
FOR AN EXAMPLE OF WHAT I'M TALKING ABOUT GO TO TO:
http://flbonline.com/indexNew.htm and then click on STATS on the left column. Try scrolling to the bottom in IE8 and you will see the rows become misaligned when you scroll all the way down. Try this in Firefox, and it works perfectly. The rows stay lined up.
Either way, I'm using this to replace Microsofts Tabular Data Control (databinding) that I used years ago when I first wrote this code. It worked great....but only in Internet Explorer. It is great to have something that works on multiple browswers! It seems to load a little slower, but offers a lot more built in options. You have created a great tool.
This discussion has been closed.
Replies