lili5058

Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • in reply to: subgrid does not expand when grouping is active #102187
    lili5058
    Participant

    Here is the text from

    var billGrid;
    var colModelNames = [ ‘serviceName’, ‘CI_NAME’, ‘volumeName’,’CI_TYPE’,’UDDS’, ‘amount’, ‘billingCodeCmdb’, ‘ovrrdBillingCode’, ‘isSplitBilling’, ‘billingCodeType’];
    var emptyMsgDiv = $(‘There are no unposted rows’);
    $(function(){
    var targetPage = 1;
    billGrid = $(“#list”).jqGrid({
    url:”${createLink(controller:’storageBilling’, action:’getSummaryBillData’, params:[id:billing.id, postedStatus: ‘canBePosted’])}”,
    datatype: ‘json’,
    mtype: ‘GET’,
    colNames:[ ‘SEO Service billed’, ‘CI billed’, ‘Volume Name’,’CI Type’,’UDDS’, ‘Amount Billed’,’CMDB Billing code’,’Billing Code Override’, ‘Split’, ‘Billing Code Type’, ‘SourceBillable’],
    colModel :[
    {name:colModelNames[0],width:60, sortable:true, sorttype:’text’},
    {name:colModelNames[1], width:50, editable:true, edittype:’text’, formatter:formatCiName},
    {name:colModelNames[2], width:70, sortable:true, sorttype:’text’},
    {name:colModelNames[3], width:50, sortable:true, sorttype:’text’},
    {name:colModelNames[4], width:30, sortable:true},
    {name:colModelNames[5], width:30, sortable:true, align:’right’, formatter:’currency’, sorttype:’currency’,
    formatoptions:{decimalPlaces:0,prefix:’$’},summaryType:’sum’},
    {name:colModelNames[6], width:50, editable:true, sortable:true},
    {name:colModelNames[7], width:50, editable:true, sortable:true},
    {name:colModelNames[8], width:50},
    {name:colModelNames[9],hidden:true},
    {name:’sourceBillable’, hidden:true}
    ],
    width: ‘1000’,
    toppager:true,
    height: ‘100%’,
    pager: ‘#pager’,
    rowNum:1000,
    rowList:[10,20,50,100,1000],
    viewrecords: true,
    gridview: true,
    jsonReader:{repeatitems: false},
    loadonce: true,
    footerrow : true,
    grouping:true,
    groupingView: {
    groupField:,
    groupOrder:,
    groupSummary:[true,true],
    groupColumnShow:[false,false],
    groupCollapse:false,
    },
    subGrid: true,
    subGridRowExpanded: function(subgrid_id, row_id) {
    var subgrid_table_id;
    subgrid_table_id = subgrid_id+”_t”;
    jQuery(“#”+subgrid_id).html(“

    “);
    jQuery(“#”+subgrid_table_id).jqGrid({
    url:’${createLink(controller:’billableServiceItem’, action:’getDetails’)}&id=’ + row_id,
    datatype: “json”,
    colNames: ,
    colModel: [
    {name:”valnotes”,index:”valnotes”,width:200, cellattr:detailsFormatter},
    {name:”billval”,index:”billval”,width:200, cellattr:detailsFormatter},
    {name:”cidetails”,index:”cidetails”,width:400,formatter:ciDetailsFormatter},
    ],
    height: ‘100%’,
    });
    function ciDetailsFormatter(cellvalue, options, rowObject){
    var ciObj = jQuery.parseJSON(cellvalue);
    var ciObjStr = “”;
    for (var prop in ciObj){
    if (ciObj.hasOwnProperty(prop)){
    ciObjStr = ciObjStr + prop + “: ” + ciObj[prop] + “, “;
    }
    }
    return ‘‘ + ciObjStr + ‘‘;
    };
    function detailsFormatter(rowId, val, rawObject, cm){
    return ‘class=”wrapTableCell”‘;
    };
    },
    caption: ‘Storage Items to be billed’,
    loadComplete: onLoadComplete,
    }).navGrid(‘#list_toppager’, {add:false, del:false, edit:false, refresh:false, search:false},{},{},{},{},{});

    in reply to: sorting: zero values not sorted #101803
    lili5058
    Participant
    in reply to: sorting: zero values not sorted #101798
    lili5058
    Participant

    Here is some different data. One cell has ovrrdAmount: 0, most have null, some have a few different values.

    Is there a way to upload screenshots? Unfortuately the site is not publicly available so I can give a link.

    [

    {

    “id”: 128650,

    “cell”: {

    “serviceName”: “Physical Hosting-Tape Library Frame (Storage)”,

    “CI_NAME”: “ACD-CALL-LOGGER-1”,

    “CI_TYPE”: “Server-Appliance”,

    “UDDS”: “A-06-5043”,

    “amount”: 50,

    “ovrrdAmount”: null,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “A-06-5043”,

    “ovrrdBillingCode”: null,

    “isBillingCodeValid”: “y”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: false

    }

    },

    {

    “id”: 128570,

    “cell”: {

    “serviceName”: “Physical Hosting-Tape Library Frame (Storage)”,

    “CI_NAME”: “ACD-CALL-LOGGER-2”,

    “CI_TYPE”: “Server-Appliance”,

    “UDDS”: “A-06-5043”,

    “amount”: 50,

    “ovrrdAmount”: null,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “A-06-5043”,

    “ovrrdBillingCode”: null,

    “isBillingCodeValid”: “y”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: false

    }

    },

    {

    “id”: 128607,

    “cell”: {

    “serviceName”: “Physical Hosting-Tape Library Frame (Storage)”,

    “CI_NAME”: “ACD-REMOTE-1”,

    “CI_TYPE”: “Server-Appliance”,

    “UDDS”: “A-06-5043”,

    “amount”: 50,

    “ovrrdAmount”: null,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “A-06-5043”,

    “ovrrdBillingCode”: null,

    “isBillingCodeValid”: “y”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: false

    }

    },

    {

    “id”: 128521,

    “cell”: {

    “serviceName”: “Physical Hosting-Tape Library Frame (Storage)”,

    “CI_NAME”: “ACD-REMOTE-2”,

    “CI_TYPE”: “Server-Appliance”,

    “UDDS”: “A-06-5043”,

    “amount”: 50,

    “ovrrdAmount”: null,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “A-06-5043”,

    “ovrrdBillingCode”: null,

    “isBillingCodeValid”: “y”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: false

    }

    },

    {

    “id”: 128335,

    “cell”: {

    “serviceName”: “Physical Hosting-Firewalll (Network)”,

    “CI_NAME”: “ADAMS”,

    “CI_TYPE”: “Network-Firewall”,

    “UDDS”: “A-06-0170”,

    “amount”: 50,

    “ovrrdAmount”: null,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “10004827.001.99”,

    “ovrrdBillingCode”: null,

    “isBillingCodeValid”: “y”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: false

    }

    },

    {

    “id”: 128532,

    “cell”: {

    “serviceName”: “Physical Hosting-Tape Library Frame (Storage)”,

    “CI_NAME”: “ADIX (HD-ACD)”,

    “CI_TYPE”: “Server-Appliance”,

    “UDDS”: “A-06-5043”,

    “amount”: 500,

    “ovrrdAmount”: null,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “A-06-5043”,

    “ovrrdBillingCode”: null,

    “isBillingCodeValid”: “y”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: false

    }

    },

    {

    “id”: 128311,

    “cell”: {

    “serviceName”: “Physical Hosting-Full”,

    “CI_NAME”: “ADRIC”,

    “CI_TYPE”: “Server-Physical-RackMount”,

    “UDDS”: “A-06-7171”,

    “amount”: 253,

    “ovrrdAmount”: null,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “A-06-7171”,

    “ovrrdBillingCode”: null,

    “isBillingCodeValid”: “y”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: false

    }

    },

    {

    “id”: 128701,

    “cell”: {

    “serviceName”: “Physical Hosting-Tape Library (Storage)”,

    “CI_NAME”: “ADRICR”,

    “CI_TYPE”: “NONE”,

    “UDDS”: null,

    “amount”: null,

    “ovrrdAmount”: 20,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: null,

    “ovrrdBillingCode”: “A”,

    “isBillingCodeValid”: “n”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: true

    }

    },

    {

    “id”: 128603,

    “cell”: {

    “serviceName”: “Physical Hosting-Full”,

    “CI_NAME”: “ADX-MASTER1”,

    “CI_TYPE”: “Server-Physical-RackMount”,

    “UDDS”: “A-06-4190”,

    “amount”: 237,

    “ovrrdAmount”: null,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “10004986.002”,

    “ovrrdBillingCode”: null,

    “isBillingCodeValid”: “y”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: false

    }

    },

    {

    “id”: 128278,

    “cell”: {

    “serviceName”: “Physical Hosting-Full”,

    “CI_NAME”: “ADX-MASTER2”,

    “CI_TYPE”: “Server-Physical-RackMount”,

    “UDDS”: “A-06-4190”,

    “amount”: 237,

    “ovrrdAmount”: null,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “10004986.002”,

    “ovrrdBillingCode”: null,

    “isBillingCodeValid”: “y”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: false

    }

    },

    {

    “id”: 128480,

    “cell”: {

    “serviceName”: “Physical Hosting-Full”,

    “CI_NAME”: “ALLIGATOR”,

    “CI_TYPE”: “Server-Physical-RackMount”,

    “UDDS”: “A-06-7180”,

    “amount”: 237,

    “ovrrdAmount”: 112,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “10004791.103”,

    “ovrrdBillingCode”: null,

    “isBillingCodeValid”: “y”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: false

    }

    },

    {

    “id”: 128681,

    “cell”: {

    “serviceName”: “Physical Hosting-Full”,

    “CI_NAME”: “ALLIGATOR”,

    “CI_TYPE”: “Server-Physical-RackMount”,

    “UDDS”: “A-06-7180”,

    “amount”: 237,

    “ovrrdAmount”: 125,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “10004791.103”,

    “ovrrdBillingCode”: “A-06-4089”,

    “isBillingCodeValid”: “n”,

    “billYorN”: “y”,

    “isSplitBilling”: “y”,

    “volumeName”: null,

    “isNonCI”: false

    }

    },

    {

    “id”: 128305,

    “cell”: {

    “serviceName”: “Physical Hosting-Full”,

    “CI_NAME”: “AMBROSIA”,

    “CI_TYPE”: “Server-Physical-RackMount”,

    “UDDS”: “A-06-4281”,

    “amount”: 302,

    “ovrrdAmount”: 0,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “A-06-4281”,

    “ovrrdBillingCode”: “D000243”,

    “isBillingCodeValid”: “y”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: false

    }

    },

    {

    “id”: 128274,

    “cell”: {

    “serviceName”: “Physical Hosting-Full”,

    “CI_NAME”: “AMENHOTEP”,

    “CI_TYPE”: “Server-Physical-RackMount”,

    “UDDS”: “A-06-4029”,

    “amount”: 237,

    “ovrrdAmount”: null,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “A-06-4029”,

    “ovrrdBillingCode”: null,

    “isBillingCodeValid”: “y”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: false

    }

    },

    {

    “id”: 128448,

    “cell”: {

    “serviceName”: “Physical Hosting-Full”,

    “CI_NAME”: “AMUN”,

    “CI_TYPE”: “Server-Physical-RackMount”,

    “UDDS”: “A-06-4029”,

    “amount”: 237,

    “ovrrdAmount”: null,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “A-06-4029”,

    “ovrrdBillingCode”: null,

    “isBillingCodeValid”: “y”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: false

    }

    },

    {

    “id”: 128604,

    “cell”: {

    “serviceName”: “Physical Hosting-Full”,

    “CI_NAME”: “ANTIGONISH”,

    “CI_TYPE”: “Server-Physical-RackMount”,

    “UDDS”: “A-06-4026”,

    “amount”: 286,

    “ovrrdAmount”: null,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “10003130.700”,

    “ovrrdBillingCode”: null,

    “isBillingCodeValid”: “y”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: false

    }

    },

    {

    “id”: 128436,

    “cell”: {

    “serviceName”: “Physical Hosting-Full”,

    “CI_NAME”: “ANUBIS”,

    “CI_TYPE”: “Server-Physical-RackMount”,

    “UDDS”: “A-06-4029”,

    “amount”: 237,

    “ovrrdAmount”: null,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “A-06-4029”,

    “ovrrdBillingCode”: null,

    “isBillingCodeValid”: “y”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: false

    }

    },

    {

    “id”: 128509,

    “cell”: {

    “serviceName”: “Physical Hosting-Full”,

    “CI_NAME”: “ARIAL”,

    “CI_TYPE”: “Server-Physical-RackMount”,

    “UDDS”: “A-06-7173”,

    “amount”: 237,

    “ovrrdAmount”: null,

    “isCmdbDataValid”: “yes”,

    “billingCodeCmdb”: “A-06-7173”,

    “ovrrdBillingCode”: null,

    “isBillingCodeValid”: “y”,

    “billYorN”: “y”,

    “isSplitBilling”: “n”,

    “volumeName”: null,

    “isNonCI”: false

    }

    }

    ]

    in reply to: sorting: zero values not sorted #101789
    lili5058
    Participant

    Sure, of course. Here is the info you need. I'm getting the data from the server, but switching to local data with the loadone:true. There is a bit of Grails code in the following snippets, FYI.

    Full grid setup:

    Sample data from the server:

Viewing 4 replies - 1 through 4 (of 4 total)

Stay connected with us in your favorite flavor!