Scroll bar shifts when adding or subtracting a row

Scroll bar shifts when adding or subtracting a row

smittlessmittles Posts: 13Questions: 0Answers: 0
edited February 2012 in General
I've got a site under development, not online, where each row save for the Default entry has an option to remove the row. The table functions as a list of saved customized widgets. When the page first loads, if there are 6 or fewer entries, the row correctly juts over the scroll bar to the right of the table. However, when adding to that table, when the page refreshes, the row incorrectly recedes from the right side, as if the scroll-bar wasn't there. That leaves the scroll-bar hanging out to the right side in an awkward way.

Anybody else have that issue?

Replies

  • smittlessmittles Posts: 13Questions: 0Answers: 0
    Looks like this is related to the fnAdjustColumnSizing, but I cannot get it to work correctly. At 7 entries, the header row recedes from the right side, the width of the ScrollY scrollbar.
  • smittlessmittles Posts: 13Questions: 0Answers: 0
    edited February 2012
    This code:
    [code]
    //Set Player Table - DataTable Configuration
    var oTable = $('#table-player-list').dataTable({
    "oLanguage": {
    "sEmptyTable": "No Custom Players Found."
    },
    "bFilter":false,
    "bInfo": false,
    "bPaginate": true,
    "sScrollY": "150px",
    "bScrollCollapse":true,
    "bJQueryUI": true,
    "bSort": true,
    "aoColumnDefs":[
    { "bVisible":false, "aTargets":aHidden}
    ]});

    $(window).bind('resize', function () {
    oTable.fnAdjustColumnSizing();
    } );
    [/code]

    does not rectify the problem. I'll post more info as I discover it.
  • smittlessmittles Posts: 13Questions: 0Answers: 0
    The strange thing is the behavior is fine under a certain number of rows.
  • smittlessmittles Posts: 13Questions: 0Answers: 0
    edited February 2012
    Here's a link to the image of the table with 6 rows: http://dirtymitten.org/img/dataTable_6_entries.png
    Compared to the one with 7 entries, notice the row doesn't make it over the scroll bar:
    http://dirtymitten.org/img/dataTables_7_entries.png
  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Are you using DataTables 1.9.1.dev nightly from the downloads page? If not can you try that? Otherwise can you post a link to an example page showing the problem please?

    Allan
  • smittlessmittles Posts: 13Questions: 0Answers: 0
    Unfortunately, as with many other posters, I'm working on a development server, trying to keep the project under wraps. I think a broader understanding of datatables, and figuring out the themeroller is in order at the moment.
This discussion has been closed.