DGRID没有排序(DGRID not sorting)

编程入门 行业动态 更新时间:2024-10-22 17:28:39
DGRID没有排序(DGRID not sorting)

我有一个带有指定dstore / Memory存储的dojo dgrid

_instance = new Memory({ data: { identifier:'monthNumeric', items: [] } });

当我单击网格的标题时,我看到排序箭头更改,但没有更改网格中的内容。

我查看了代码,看到它构建了一个排序对象。 然后它从_StoreMixins.js调用此代码

_applySort: function () { if (this.collection) { this.set('collection', this.collection); } else if (this.store) { console.debug('_StoreMixin found store property but not collection; ' + 'this is often the sign of a mistake during migration from 0.3 to 0.4'); } },

集合的设置似乎创建了一个排序函数,但它实际上并没有执行它。

这应该怎么样?

(我不知道它是否重要,但是同一个商店也被用在Dojo图表中,包含在DStoreAdapter中。但这不是它在这里使用的方式)

I have a dojo dgrid with an assigned dstore/Memory store

_instance = new Memory({ data: { identifier:'monthNumeric', items: [] } });

When I click on the header of the grid, I see the sort arrow change, but no changes to contents in grid.

I traced through the code, ans see it build a sort object. Then it calls this code from _StoreMixins.js

_applySort: function () { if (this.collection) { this.set('collection', this.collection); } else if (this.store) { console.debug('_StoreMixin found store property but not collection; ' + 'this is often the sign of a mistake during migration from 0.3 to 0.4'); } },

the setting of the collection seems to create a sort function, but it does not actually execute it.

How is this supposed to work?

(I don't know if it matters, but the same store is also being used with a Dojo chart, wrapped in a DStoreAdapter. But that is not how it is being used here)

最满意答案

dgrid 1.1.0在setCollection的刷新周围添加了_started检查

由于我从未在网格上进行过启动,因此未设置。 一旦我开始启动,一切都按预期工作

dgrid 1.1.0 added a check for _started around the refresh in setCollection

Since I never did a startup on the grid, this was not set. Once I caled startup, everything worked as desired

更多推荐

本文发布于:2023-08-07 11:06:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464240.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:DGRID   sorting

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!