2012-08-15 21 views
0

我目前正试图在jqGrid中实现多分组,但似乎无法做到正确。下面 见代码:在JqGrid中多分组目前支持?

colNames:['Programme','Course', 'Fee Type','Description','Apply', 'Amount', 'Discount', 'Discounted Amt','GATE Amount'], 
        colModel:[ 
         {name:'programme',index:'programme', width: 25}, 
         {name:'moduleInstance',index:'moduleInstance', width:30 
         }, 
         {name:'feeType',index:'feeType', width:15 
         },       
         {name:'description',index:'description', width:15 
         }, 
         {name:'isApplicable',index:'isApplicable', width:4, editable:true, edittype:'checkbox', editoptions: { value:"True:False"},formatter: "checkbox", formatoptions: {disabled : false} 
         }, 
         {name:'amount',index:'amount', width:5 
         },     
         {name:'discount',index:'discount', width:5, editable:true}, 
         {name:'discountAmount',index:'discountAmount', width:8}, 
         {name:'gateAmountCovered',index:'gateAmountCovered', width:8, editable:true} 
        ],sortname: 'moduleInstance', 
        grouping:true, 
        groupingView : { 
         groupField : ['programme', 'moduleInstance'], 
         groupColumnShow : [false, false], 
         groupText : ['<b>{0} - {1} Item(s)</b>', '{0}'] 
        }, 

在头部这仅显示节目标题,而不是其他。任何人都可以告诉我我在这里做错了什么?

回答

0

我从来没有实现分组,但我在我的例子中试过这段代码,得到了和你一样的结果。然后我看着谷歌,发现this

这是一个很旧的帖子,在2011年,但我想他们是正确的,它不支持。这就是为什么他们会提出这种多组方法。看看this和这old answer。至少你会得到一些参考。