ArrayCollection 移除排序 [英] ArrayCollection removing sort

查看:23
本文介绍了ArrayCollection 移除排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对我的数据提供者(数组集合)应用数字排序后,我无法通过 tilelist 重新排序项目.我是否需要从 arrayCollection 中删除排序?如果是这样,是否只是设置 collection.sort = null 的情况?

After applying a numeric sort to my dataprovider(Array Collection), I can not reorder the items via a tilelist. Do I need to remove the sort from the arrayCollection. If so, is it just a case of setting collection.sort = null ?

var sortField:SortField=new SortField();
sortField.name="order";
sortField.numeric=true;
var sort:Sort=new Sort();
sort.fields=[sortField];

推荐答案

将排序设置为 null 确实应该删除集合的排序.您可能需要执行可选的 refresh().

Setting the sort to null should indeed remove the sort for the collection. You might need to do an optional refresh().

这篇关于ArrayCollection 移除排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆