2012-08-15 53 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。至少你會得到一些參考。