Extjs自定义网格行分组

发布于 2025-01-06 12:31:17 字数 593 浏览 1 评论 0原文

我在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

离线来电— 2025-01-13 12:31:17

您可以使用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.html

Unfortunately it is only available in Ext JS 3. It should be available in Ext JS 4.1 though.

伴我心暖 2025-01-13 12:31:17

看起来您需要对前两列进行分组,但不幸的是 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文