简体   繁体   English

Jqgrid分组-摘要标题?

[英]Jqgrid Grouping - summary header?

Would it somehow be possible to display every column in the "Click to expand" row for grouping? 是否可以某种方式显示“单击以展开”行中的每一列进行分组? For instance, in the Grouping demo here , instead of showing simply the expand icon and the text "test", I want that row to contain table cells for every column. 例如,在这里的Grouping演示中,我希望该行包含每一列的表格单元,而不是简单地显示展开图标和文本“ test”。

For what I'm doing, I want that row to summarize/aggregate the data for each row in the group. 对于我正在做的事情,我希望该行汇总/汇总组中每一行的数据。 So initially, that row will contain the summarized data when the grid is loaded, and the user can click to expand to view the details. 因此,最初,加载网格时,该行将包含汇总数据,用户可以单击以展开以查看详细信息。

So basically, I want a summary header instead of a summary footer, and the expand icon should be on this header row. 因此,基本上,我希望使用摘要标题而不是摘要页脚,并且展开图标应位于此标题行上。

Never mind, I got it to work. 没关系,我知道了。 I'm letting JqGrid do all the work of aggregating the data and then, I simply take all children (table cells) of the footer row and place them inside the header row. 我让JqGrid完成汇总数据的所有工作,然后,我简单地获取页脚行的所有子级(表单元格)并将它们放在页眉行中。

Note: If you have the summary footer rows turned on in the grouping view, you have to make sure that the footer row is present even though you're not using it (and even though nothing is in it). 注意:如果在分组视图中打开了摘要页脚行,则即使不使用页脚行(即使其中没​​有任何内容),也必须确保该页脚行存在。 If you don't, and you try to expand the group, it'll end up expanding every group below it. 如果不这样做,则尝试扩展组,最终将扩展它下面的每个组。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM