flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Ent (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-35224) DataGrid doesn't support paging on large data set
Date Mon, 09 Jan 2017 15:54:58 GMT

    [ https://issues.apache.org/jira/browse/FLEX-35224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15812099#comment-15812099

Peter Ent commented on FLEX-35224:

Unfortunately, ActionScript doesn't have the concept of extensions (like Swift and Objective-C),
so the best you can do is sub-class DataGrid to add in the pageSize property. However, it
might be better to incorporate that into a new DataGridPresentationModel bead (which is where
the DataGrid would store that value anyway).

If you update the data provider by bringing in a new "page" of data, your data provider implementation
could dispatch a "page" event or a custom event with all the information it has (e.g., what
new rows were added to the data set). Your DataGroup replacement would receive the event and
look at the itemRenderers it already has. It could then determine if it needed new itemRenderers
to cover the new data (maybe the first page had 4 rows and the next page brings in 10 rows
so the DataGroup would determine it needed 6 more rows from the factory) and if it could reuse
itemRenderers already present.

Once the DataGroup determined what it needed for itemRenderers, it could use the information
in the event to extract the data from the dataProvider and give it to the itemRenderers which
would then redraw themselves. 

Alternatively, if you wanted to put the effort into it, you go animate the itemRenderers and
have them slide up or down to reveal themselves, but you would need to cache itemRenderers
and add new ones from time to time to make the animation work properly.

I hope this helps.

> DataGrid doesn't support paging on large data set
> -------------------------------------------------
>                 Key: FLEX-35224
>                 URL: https://issues.apache.org/jira/browse/FLEX-35224
>             Project: Apache Flex
>          Issue Type: Improvement
>            Reporter: Pan Li
>            Priority: Minor
>         Attachments: FilesOfPagingDataGridUsingBeads.zip, PagingDataGridAsBeads.patch,
TestPagingDataUsingBeads.zip, screenshot-1.png, src.zip
> expected:
> Gird should support paging if data collection is large
> !screenshot-1.png!

This message was sent by Atlassian JIRA

View raw message