Extjs自定义网格行分组
我在使用 Extjs 创建表时遇到了一些问题。我的表结构困难
-------------------------------------------|
| | | 4 |
| | 2 ---------|
| | | 5 |
| 1 |---------------------------|
| | | 6 |
| | 3 ---------|
| | | 7 |
-------------------------------------------|
来自服务器的数据如下:
1 2 4
1 2 5
1 3 6
1 3 7
每个序列都是一个数组 我需要将它们按上图所示分组。
有什么想法吗?
I met some problems with creating table using Extjs. My table has difficult structure
-------------------------------------------|
| | | 4 |
| | 2 ---------|
| | | 5 |
| 1 |---------------------------|
| | | 6 |
| | 3 ---------|
| | | 7 |
-------------------------------------------|
The data from the server are as following:
1 2 4
1 2 5
1 3 6
1 3 7
Every sequence is an array
I need them to be grouped as at the picture above.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用
PivotGrid
。示例: http://dev.sencha.com/deploy /ext-3.4.0/examples/pivotgrid/simple.html不幸的是,它仅在 Ext JS 3 中可用。但它应该在 Ext JS 4.1 中可用。
You can use
PivotGrid
. Example: http://dev.sencha.com/deploy/ext-3.4.0/examples/pivotgrid/simple.htmlUnfortunately it is only available in Ext JS 3. It should be available in Ext JS 4.1 though.
看起来您需要对前两列进行分组,但不幸的是 Ext.data.Store 仅支持一级分组。您必须扩展 Store 以支持更多功能,并扩展 Ext.grid.feature.Grouping 才能利用它。
It looks like you need to group on the first two columns but unfortunately Ext.data.Store only supports one level of grouping. You'll have to extend Store to support more and Ext.grid.feature.Grouping to take advantage of it.