Weird View when loading Before Pagination

Weird View when loading Before Pagination

gforstegforste Posts: 4Questions: 0Answers: 0
edited November 2013 in General
I have a table setup - all is working well, except that when you first go to the page, the table expands fully (hundreds of rows) before reducing size and showing the (correct) pagination view. Has this been seen before? Is there a workaround?

Replies

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin
    This sounds like the Flash of Unscripted Content - basically the table is seen before DataTables is initialised. If you are initialising the table in $(document).ready() then in modern browsers you shouldn't be seeing this. Are you doing that, and what browser are you using?

    Allan
  • gforstegforste Posts: 4Questions: 0Answers: 0
    Yes, I am. Using Chrome & Firefox (latest version) in Mac, linux, and windows
    [code]
    $(document).ready(function () {
    if ($("#report").length) {
    $("#report").dataTable({
    aaSorting: [
    [1, "desc"]
    ],
    sDom: "<'row-fluid dt-header'<'span6'f><'span6 hidden-phone'T>r>t<'row-fluid dt-footer'<'span6 visible-desktop'li><'span6'p>>",
    "sRowSelect": "multi",
    "sSelectedClass": "row_selected",
    sPaginationType: "bootstrap",
    oLanguage: {
    sLengthMenu: "Showing: _MENU_",
    sSearch: ""
    },
    bStateSave: "true",
    oTableTools: {
    sSwfPath: "js/include/assets/DT/swf/copy_csv_xls_pdf.swf",
    aButtons: [{
    sExtends: "copy",
    sButtonText: '' + "Copy"
    }, {
    sExtends: "print",
    sButtonText: ' Print View'
    }, {
    sExtends: "pdf",
    sPdfOrientation: "landscape",
    sPdfMessage: "Report.",
    sButtonText: ' Save to PDF'
    }, {
    sExtends: "xls",
    sButtonText: ' Save for Excel'
    }]
    }
    })
    }
    [/code]
This discussion has been closed.