簡體   English   中英

目前是否支持JqGrid中的多重分組?

[英]Is Multi Grouping in JqGrid Currently supported?

我目前正在嘗試在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}']
                    },

這僅在標題上顯示程序標題,而不在其他標題上顯示。 誰能告訴我我在做什么錯?

我從未實現分組,但是在示例中嘗試了此代碼,並得到了與您相同的結果。 然后我看着谷歌,發現了這個

這是一篇非常古老的文章,在2011年發表,但我想他們是對的,不支持。 這就是為什么他們會提出multipleGroup方法的原因。 看看這個和這個老答案 至少您會獲得一些參考。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM