目前是否支持 JqGrid 中的多分组

Is Multi Grouping in JqGrid Currently supported?

本文关键字:是否 支持 JqGrid 目前      更新时间:2023-09-26

我目前正在尝试在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 年,但我想他们是对的,它不受支持。 这就是为什么他们会想出这种多组方法。看看这个和这个旧的答案。至少你会得到一些参考。