flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [FlexJS] Probable design to support DataGrid sorting
Date Thu, 05 Jan 2017 16:33:04 GMT

On 1/5/17, 2:53 AM, "sankar" <santanu4ver@gmail.com> wrote:

>Accessing DataGridPresentationModel from
>seems quite tough even though it could be a nice place to store those
>To get DataGridPresentationModel I'll need to access their multiple
>as DataGridButtonBarButtonItemRenderer.parent.parent.parent which sounds
>bad. _strand is also private in components and some do not have them at
>thus _strand.getBeadByType() is not always an available feature as well.
>I'm sticking to my earlier implementation for the time being until I get a
>way to access DataGridPresentationModel in
>DataGridButtonBarButtonItemRenderer without referring multiple parent

Hi Santanu,

So far, no component has needed access to a parent component, so you are
right that a new pattern needs to be invented to handle it. I would
recommend having the view pass its host strand to the children.  So,
because of PAYG, you would create a class called something like
DataGridViewWithSortableColumns where the code there sets a new property
called something like "parentStrand" on a
DataGridButtonBarForSortableColumns class.

Storing the state of the sorting in the column renderers itself doesn't
allow for setting an initial sorting state, so at some point, that
functionality will need to be supported.  IOW, what if you want the DG to
show up already sorted by the 3rd column?


View raw message