cgatling

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Pager Not Properly Centered on Grid #127037

    cgatling
    Participant

    Hi Will,

    Thank you for the catch, but unfortunately that did not fix the issue. It did however  prompt me to look a bit more at my grid setup (we use the same setup on most pages) and after some trial and error I was able to isolate the issue to the  autowidth : true setting, after removing it the pager buttons were centered correctly. I suspect there is bug somewhere as that setting should not cause the pager to not be centered but for us removing the setting it is an an acceptable solution.

     

    Thanks for your help.

    in reply to: Pager Not Properly Centered on Grid #127029

    cgatling
    Participant

    $ (“#reportTable”).jqGrid({

    caption : “Fraud Report”,

    colModel : columnModel,

    autowidth : true,

    datatype : ‘json’,

    pager : “#reportTable-pager”,

    viewrecords : true,

    gridview : true,

    headertitles : true,

    altRows : false,

    rowNum : 50,

    loadonce : true,

    scrollPopUp : true,

    scrollLeftOffset : “83%”,

    scroll : 1, // set the scroll property to 1 to enable paging with//

    // <u>scrollbar</u> – virtual loading of records

    emptyrecords : ‘Scroll to bottom to retrieve new page’,

    gridComplete : function() {

    if ($(“#reportTable”).jqGrid(‘getGridParam’, ‘datatype’) == “json”) {

    $(“#reportTable”).setGridParam({

    datatype : ‘local’

    });

    maximizeTable();

    $(window).trigger(‘resize’);

    }

    },

    grouping : true,

    groupingView : {

    groupField : [ “issuerPcrDescp”, “issuerBin” ],

    groupColumnShow : [ false, false ],

    groupText : [ “Issuer Pcr: <b>{0}</b> Fraud Total: <b>{fraudCount}<b>”, “Issuer Bin: <b>{0}</b>” ],

    groupOrder : [ “asc”, “asc” ],

    groupSummary : [ true, false ],

    groupSummaryPos : [ ‘footer’, ‘footer’ ],

    groupCollapse : false,

    showSummaryOnHide : true

    },

    jsonReader : {

    root : “listOfRecords”,

    page : “currentPageIndex”,

    total : “1”,

    records : “totalItems”,

    repeatitems : false,

    cell : “cell”,

    id : “id”,

    userdata : “userdata”

    }

    });

     

    jQuery(“#reportTable”).jqGrid(‘navGrid’, “#reportTable-pager”, {

    edit : false,

    add : false,

    del : false,

    search : false,

    refresh : false

    });

     

    jQuery(“#reportTable”).jqGrid(‘navButtonAdd’, ‘#reportTable-pager’, {

    caption : “”,

    title : “Export Fraud Report data to Excel”,

    id : “exportExcelButton”,

    buttonicon : ‘ui-icon-print’,

    onClickButton : function() {

    $(‘#exportExcelButton’).addClass(‘ui-state-disabled’); // disable

    $(“body”).css(“cursor”, “progress”);

    setTimeout(function() {

    $(“#reportTable”).jqGrid(“exportToExcel”, {

    includeLabels : true,

    includeGroupHeader : true,

    includeFooter : true,

    fileName : $(“#reportTable”).jqGrid(“getGridParam”, “caption”).replace(/\s+/g, ‘_’) + “_” + getTimestamp() + “.xlsx”,

    maxlength : 50, // <u>maxlength</u> for visible string data

    onBeforeExport : appendContextDataToExport,

    replaceStr : replaceExportString

    });

    $(“body”).css(“cursor”, “default”);

    $(‘#exportExcelButton’).removeClass(‘ui-state-disabled’); // enable

    }, 30);

    }

    });

    • This reply was modified 3 weeks, 6 days ago by  cgatling.
    • This reply was modified 3 weeks, 6 days ago by  cgatling.
    • This reply was modified 3 weeks, 6 days ago by  cgatling.
    • This reply was modified 3 weeks, 6 days ago by  cgatling.
    in reply to: Excel export Rounding values #126263

    cgatling
    Participant

    Hi Tony,

    The issue is not that my value is not already a string but that the the export to excel code is treating my number as a ‘number’ instead of a string. Basically when the value in exported the cell is being marked as a ‘number’ cell instead of an ‘inlineStr’.

     

    To fix this i propose the follow change update the regex check to insure values that are larger than the IEEE 15 digits are treated as strings as to not have them be truncated in the exported file.

    http://jsfiddle.net/cgatling/2xwctngx/1/

Viewing 3 posts - 1 through 3 (of 3 total)

Stay connected with us in your favorite flavor!