AS3的DataGrid分页< previous 1 2 3 4 5下一页> [英] AS3 datagrid with pagination <previous 1 2 3 4 5 Next>

查看:214
本文介绍了AS3的DataGrid分页< previous 1 2 3 4 5下一页>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的AS3 FL​​ASH。 任何一个可以帮助/引导/或提供一个链接,如何创建的DataGrid分页。 我已经成功地创建数据网格,并从数据库中使用PHP动态地填写。 我有600多条记录,并想展示100条记录中的电网,并显示分页与旁边,previous选项娄吧。

I am new to AS3 FLASH. Can any one help/guide/or provided a link for, HOW TO CREATE DATAGRID with paging. I have successfully create datagrid and fill dynamically from database using php. I have more than 600 records and want to show 100 records in grid and show paging bellow it with next , previous option.

这是我的code.every的事情是工作的罚款。我想添加分页的。

this is my code.every thing is working fine. I want add paging it.

for (varName in returnObj) {
var plid                = int   (returnObj[varName]["plid"]);
var varState            = String(returnObj[varName]["state"]);
var varCity             = String(returnObj[varName]["city"]);

arrDP.push({        //arrDP is array defined
    //Column          Value
    Select          : plid, 
    State           : varState,
    City            : varCity
});

var dp:DataProvider              = new DataProvider(arrDP);
var select:DataGridColumn        = dg.addColumn("Select");
var state :DataGridColumn        = dg.addColumn("State");
var city  :DataGridColumn        = dg.addColumn("City");    
dg.dataProvider                  = dp; //dg IS DATAGRID NAME AND dp IS DATAPROVIDER
}

总之我需要一些东西像下面的链接。 的http://www.iamboredsoiblog.eu/2009/01/10/advanced-paging-and-filtering-in-flex-datagrid/

in short i need some thing like in link below. http://www.iamboredsoiblog.eu/2009/01/10/advanced-paging-and-filtering-in-flex-datagrid/

推荐答案

有一个'极限[开始],[长度]'就可以了你的PHP查询。穿上你的DataGrid的底部按钮,重新查询与相应的起点下一个查询。

Have your PHP query with a 'limit [start],[length]' on it. Put buttons on the bottom of your datagrid to requery with the appropriate starting point for the next query.

此外 - 我发现,试图读取超过超过几百记录确实减慢在我的Flex应用程序的渲染。 ESP,如果你所要求的一种或绘图任何类型的自定义控件。这只是我的$ 0.10,虽然。情况因人而异。

Also - I've found that trying to read in more than more than a few hundred records really slows down the rendering in my Flex apps. Esp if you are asking for a sort or drawing any sort of custom controls. That's just my $0.10 though. YMMV.

这篇关于AS3的DataGrid分页< previous 1 2 3 4 5下一页>的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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