Flex:数据库驱动的DataGrid:箭头消失 [英] Flex: Database driven DataGrid: arrows disappearing

查看:70
本文介绍了Flex:数据库驱动的DataGrid:箭头消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Flex中,我使用以下代码来允许在DataGrid中进行排序(数据在服务器端进行了分页和排序).

In Flex I'm using the following code to allow sorting in a DataGrid (the data is paged and sorted serverside).



        private function headerReleaseHandler(event:DataGridEvent):void
        {
            var column:DataGridColumn = DataGridColumn(event.currentTarget.columns[event.columnIndex]);

            if(this.count>0)
            {
                if(this.query.SortField == column.dataField)
                {
                    this.query.SortAscending = !this.query.SortAscending;
                }
                else
                {
                    this.query.SortField = column.dataField;
                    this.query.SortAscending = true;
                }
                this.fill();
            }

            event.preventDefault();
        }

这很好用,只是没有显示用于指示排序的箭头.我该怎么办?

This works perfectly, except that the arrows that indicate sorting isn't shown. How can I accomplish that?

谢谢! /尼尔斯

推荐答案

如果要查找的是以下示例:

There is an example here if this is what you are looking for: http://blog.flexexamples.com/2008/02/28/displaying-the-sort-arrow-in-a-flex-datagrid-control-without-having-to-click-a-column/

您似乎需要刷新数据提供者使用的集合.

It looks like you need to refresh the collection used by your dataprovider.

这篇关于Flex:数据库驱动的DataGrid:箭头消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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