Multiple table Initial issue(Scroll)

Multiple table Initial issue(Scroll)

systemsNatusystemsNatu Posts: 11Questions: 4Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:

Description of problem:
I need to use two table on same line , problem is table can not initial scrollbar correct, dataTables_scrollBody take a table head ,and not cover on real table head ,I have no idea with it.
anyone know?

Answers

  • colincolin Posts: 9,856Questions: 0Answers: 1,635

    Sorry, I'm not following. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • systemsNatusystemsNatu Posts: 11Questions: 4Answers: 0

    I use initComplete in table2, and set some css forced table1 to change ,e.g. set table2 column height same to table1's column
    -------------------like this----------------------------------
    "initComplete": function (settings, json) {
    var t1 = document.getElementById('tableFirst-location').rows;
    var t2 = document.getElementById('tableSecond-location').rows;
    for (var i = 0; i < t1.length - 1; i++) {
    t2[i].style.height = t1[i].offsetHeight + 'px';
    }
    var scroolAdjust1 = document.getElementsByClassName('table-dispaly stripe row-border cell-border hover nowrap dataTable no-footer')[0].rows;
    var scroolAdjust2 = document.getElementsByClassName('table-dispaly stripe row-border cell-border hover nowrap dataTable no-footer')[2].rows;
    scroolAdjust2[0].style.height = scroolAdjust1[0].offsetHeight + 'px';
    //table2.columns.adjust().draw();


    if table2 occur some layout problem ,use adjust().draw();

Sign In or Register to comment.