In my grid below i have 2 levels of grouping

and my grid is
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
<div class="sfcode">colModel:[<br /> {name:'szGroupAccType',index:'szGroupAccType'},<br /> {name:'szAccTypeId',index:'szAccTypeId'},<br /> {name:'szAccNm',index:'szAccNm', width:500,<br /> formatter: function (cellValue, options, rowObject, actions) {<br /> if (options.rowId === "") {<br /> var names = [], data, i, l, item;<br /> if (options.rowId === "" && typeof actions === "undefined") {<br /> <br /> data = $(this).jqGrid("getGridParam", "data");<br /> //here to set accounts on total<br /> }<br /> return cellValue;<br /> } else {<br /> return '<span style="display:inline-block;left:25px;position:relative;">' +<br /> cellValue;<br /> }<br /> },<br /> summaryType:'count', summaryTpl : 'Total ({0}) '},<br /> {name:'Balance',index:'Balance',align:'right',formatter: numberFormatter, sorttype:"float", summaryType:'sum', formatoptions:{thousandsSeparator:","}},<br /> {name:'szAccCode',index:'szAccCode', hidden:true}<br /> ],<br /> grouping:true,<br /> groupingView : {<br /> groupField : ['szGroupAccType', 'szAccTypeId'],<br /> groupSummary : [true, true],<br /> groupColumnShow : [false, false],<br /> groupText : ['<b>{0}</b>', '{0}'],<br /> groupCollapse : false,<br /> groupOrder: ['asc', 'asc'],<br /> showSummaryOnHide: true<br /> },</span></div> |
|
1 2 3 |
<div class="sfcode"><p>i hv problem with this line</p><br /> <pre><div class="sfcode">data = $(this).jqGrid("getGridParam", "data");<br /> </div> |
i've checked with firebug and var data is empty. Could you tell me where i did wrong? I'm trying to change total (in yellow) to Aktiva Tetap (110-...Bank dollar, 120- ... Bank rupiah) and total in grey with Asset (Aktiva Tetap (110-...Bank dollar, 120- ... Bank rupiah)) and so on.
Thanks in advance
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top