X-scroller extends too far under fixed column?

X-scroller extends too far under fixed column?

sjankesjanke Posts: 8Questions: 0Answers: 0
edited November 2013 in General
In the examples on the site, when using fixed columns, the x-scrollbar doesn't extend under the fixed column. But in my code, it extends under the fixed column. Otherwise the fixed column seems to work, but I hate this inconsistency. I have a nagging feeling it suggests something not quite right in what I've done (either with my CSS or with the DataTable settings). Has anyone seen this behavior? Would you know immediately what I've done wrong, if anything?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Are you using the nightly version of FixedColumns (2.5.0-dev)? If so, then this is entirely intentional. The scrollbar covers the whole scrolling area.

    Allan
  • sjankesjanke Posts: 8Questions: 0Answers: 0
    edited November 2013
    Yup, using nightly. It was bugging me that it looked different.

    O/T: Noticing a bit of weirdness. I have a table with a complex header structure. Several headers with rowspans, others with colspans. Lays out fine and I'm pretty sure it's correct. But every time I type a character into the DataTable filter, the header expands in size vertically. Layout is the same, horizontal spacing doesn't change, but every header cell with a rowspan greater than 1 stretches vertically. I have the table in a sliding div, and when I slide in-and-out to prompt a datatable redraw on the callback, the header is sized properly again. Ever see this before? Is there a known problem with rowspans and tags in the ? Should I start a different thread?

    Should have mentioned this is happening in IE8 but not in Chrome. When I run in Chrome, I have a different problem -- the scrollable portion of the table to the left of the fixed column is tucked in under the fixed column and won't slide out. Working on that one.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Are you able to link me to the page? The other thing is, it might be worth trying DataTables 1.10 pre beta: https://github.com/DataTables/DataTables/tree/1_10_wip/media/js

    Allan
  • sjankesjanke Posts: 8Questions: 0Answers: 0
    Warning comes up when I try to use 1.10.

    "TableTools 2 requires DataTables 1.9.0 or newer"

    Happens with nightly version of TableTools too.

    I'll work on an example.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Darn - that's not good. I'll check that out. In the meant time, are you able to give me a link to the page?

    Allan
  • sjankesjanke Posts: 8Questions: 0Answers: 0
    It's an internal system. I have to construct a working example and upload it somewhere. Maybe that fiddle thing-y. Right now I have other fish to fry -- I'll be getting back to this later. I was hoping someone would say, "Oh yeah, you just forgot to glim the widget. Add 'foo-bar: true' and it'll just work." but no such luck.
  • sjankesjanke Posts: 8Questions: 0Answers: 0
    OK, here's a working version. In Chrome, it works fine. It also works fine in JSFiddle, so I didn't bother putting it there. Under IE8, each keystroke in the filter box causes the header to expand. This behavior is ONLY present in the FixedColumns Nightly build. I would use the regular build of FixedColumns but the $.browser errors were annoying as hell. So it would be nice to (1) get a nightly build that has the $.browser fix but also this expanding header issue resolved or (2) go back to the regular build but with a different approach to dealing with the $.browser errors. What's your advice?

    [code]
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">






    <!-- DataTables -->






    @import "http://datatables.net/release-datatables/media/css/demo_page.css";
    @import "http://datatables.net/release-datatables/media/css/demo_table.css";

    th {border:1px solid black;}
    td {border:1px solid black;}





    $(document).ready( function () {
    var phsTable = $('#phsTable').dataTable( {
    "sDom": 'frti',
    "sScrollY": "300px",
    "sScrollX": "100%",
    "bScrollCollapse": true,
    "bPaginate": false
    } );
    new FixedColumns(phsTable);
    } );



    Click Here



    A
    B
    C
    D


    E
    F


    G
    H
    I
    J
    K
    L




    1
    2
    3
    4
    5
    6
    7
    8
    9


    a
    b
    c
    d
    e
    f
    g
    h
    i






    [/code]
  • sjankesjanke Posts: 8Questions: 0Answers: 0
    edited November 2013
    Sorry, I lied!

    [quote]
    OK, used the migration plugin:

    [code]


    [/code]

    Seems to have addressed the problem. I hope highlighting the weirdness using the nightly build helps you out. Cheers!
    [/quote]

    Still getting an error on IE8 but rock solid in Chrome. In IE8, the problem now is that the fixed column is not sizing correctly. Each row is slightly larger than the data row to the right, and it gets entirely out of alignment very quickly. *sigh*

    In IE8, the browser reports numerous script errors. In Chrome, no script errors (but a couple of warnings regarding deprecated calls). Can't tell yet in IE8 what is failing. Continuing to play with this.
This discussion has been closed.