I got a problem with sScrollY
I got a problem with sScrollY
ericsun
Posts: 2Questions: 0Answers: 0
Hi all, I am doing my job with this disgusting plugin. code is:
var addDetailDataTable = $('#addDetailConfig').DataTable({
bPaginate: false,
bInfo: false,
bFilter: true,
bSort: true ,
bAutoWidth: true,
bScrollInfinite: true,
sScrollY: '240px',
sScrollYInner: '100%',
scrollCollapse: true,
ScrollLoadGap: 6,
paging: false,
aoColumnDefs: [ { "bSortable": false, "aTargets": [ 0 ] }],
oLanguage: {
sProcessing: "Loading......",
sLengthMenu: "Show _MENU_ Records",
sZeroRecords: "Sorry, It's Empty!",
sEmptyTable: "Sorry, It's Empty!",
sSearch: ""
}
});
I need a vertical scroll, after add the code the table head float to the left and the width is 100px.
Nomatter what I do, including I specified the width in aoColumnsDef , I still cant resolve this problem.The version I used is 1.10.3.
This discussion has been closed.
Replies
Please link to a test page showing the issue, as noted in the forum rules.
Also note there is no
sScrollYInner
option.Allan
Thanks for your reply.I debug the source code.But I found no problems, where could I show my picture.This forum can't support to upload picture.I draw two simulator pictures as below:
This table shows above is I need to render on the page.But the result table like this:
The issue is that table head float to left.When I open the element detector and find that the plugin generate two tables and the first one is the thead also called the scroll_Head, and second one is scroll_Body.The width of outer div is 100px and the inner table width equals outerwidth.How does this 100px appear? I debug the source code and can not find 100px in jquery.dataTables.js, even can't find the 100px in my custom css file.Finnaly I find the 100px is define in the style attribute of div element.So the 100px is generated by plugin.
Can you please link to the page or create a test case showing the issue so we can debug it as I asked, and as noted in the forum rules?
Thanks,
Allan