Problems with ScrollX and ScrollY
Problems with ScrollX and ScrollY
slfede
Posts: 5Questions: 0Answers: 0
Hi Guys,
First of all, wanted to say that we use DataTables on our online system and we love it!
Second, there a page that we use datatables with jeditable, scrollx and scrolly.
The problem is when we use the filter that sometimes returns one record and the horizontal scrollbar covers that record.
Here's the initialization
[code]
var calcDataTableHeight = function() {
return $(window).height()*65/100;
};
$(document).ready(function(){
console.log(calcDataTableHeight());
oTable = $('#dataTable').dataTable({
"bJQueryUI": true,
"sScrollX": "100%",
"sScrollXInner": "400%",
"sScrollY": calcDataTableHeight(),
"bScrollCollapse": true,
"bScrollAutoCss": true,
"bAutoWidth": false,
"bDeferRender": true,
"bPaginate": true,
"bProcessing": true
});
oTable.fnSettings().oScroll.sY = oTable.fnSettings().oScroll.sY +35;
$('div.dataTables_scrollBody').css("height", "100%");
$("div.dataTables_scrollHeadInner").css("width","100%");
$("table.dataTable").css("width","100%");
$(".dataTables_filter").css({"float":"right"});
[/code]
Any help would be great
First of all, wanted to say that we use DataTables on our online system and we love it!
Second, there a page that we use datatables with jeditable, scrollx and scrolly.
The problem is when we use the filter that sometimes returns one record and the horizontal scrollbar covers that record.
Here's the initialization
[code]
var calcDataTableHeight = function() {
return $(window).height()*65/100;
};
$(document).ready(function(){
console.log(calcDataTableHeight());
oTable = $('#dataTable').dataTable({
"bJQueryUI": true,
"sScrollX": "100%",
"sScrollXInner": "400%",
"sScrollY": calcDataTableHeight(),
"bScrollCollapse": true,
"bScrollAutoCss": true,
"bAutoWidth": false,
"bDeferRender": true,
"bPaginate": true,
"bProcessing": true
});
oTable.fnSettings().oScroll.sY = oTable.fnSettings().oScroll.sY +35;
$('div.dataTables_scrollBody').css("height", "100%");
$("div.dataTables_scrollHeadInner").css("width","100%");
$("table.dataTable").css("width","100%");
$(".dataTables_filter").css({"float":"right"});
[/code]
Any help would be great
This discussion has been closed.