开发者

is there a way to add a summary row to jqgrid treeview

i am using jqgrid with the treegrid view and most of the columns are numbers that are aggregated up the tree. The one missing piece is having a total r开发者_运维技巧ow to aggregate the top level hierarchy. Is there something built into jqgrid to support this or should be passed down the:


Tree grid support footer row (see the second picture here) for tree grid in the same way like for the standard grid. If you calculate the content of the summary row on the server you can use userdata in the JSON input (see here). If you want have custom formatting of the summary row or if you want to calculate the values for the summary row on the client you can use footerData method inside of loadComplete for example. See here for an example.

The following simple demo produce the output:

is there a way to add a summary row to jqgrid treeview

The changes in the original treegrid code are the following:

footerrow: true,
loadComplete: function () {
    $(this).jqGrid('footerData','set',
        {name:'TOTAL', num:"500", debit:"<i>Bla</i> Bla",
        credit:'20', balance:'<span style="color:red">-1000</span>'});
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜