flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From João Fernandes <joaopedromartinsfernan...@gmail.com>
Subject Re: DataGrid custom property and item renderers
Date Fri, 04 Oct 2013 17:02:13 GMT
Why not simply create a ClassFactory for your itemRenderer instead? You
won't require to extend datagrid and just need to create a custom
ItemRenderer.

gridColumn itemRenderer="{customItemRendererFactory}"

being customItemRendererFactory
cf= new ClassFactory(SomeCustomItemRenderer)
cf.properties ={ test: "someValue};
customItemRendererFactory = cf;

João Fernandes


On 4 October 2013 17:37, mark goldin <markzolotoy@gmail.com> wrote:

> More on that. It looks like when I check for test property in prepare
> function it's null (expected an empty string) and if I try setting it up to
> a value the Expressions window briefly shows "penging" for test value and
> then quickly gets back to null. I am not sure I understand what's going on.
>
>
> On Fri, Oct 4, 2013 at 10:17 AM, mark goldin <markzolotoy@gmail.com>
> wrote:
>
> > I do callLater from prepare to update this property.
> >
> >
> > On Fri, Oct 4, 2013 at 10:14 AM, Maurice Amsellem <
> > maurice.amsellem@systar.com> wrote:
> >
> >> In what method do you make the check in the custom  itemRenderer ?
> >>
> >> -----Message d'origine-----
> >> De : mark goldin [mailto:markzolotoy@gmail.com]
> >> Envoyé : vendredi 4 octobre 2013 17:01
> >> À : users
> >> Objet : DataGrid custom property and item renderers
> >>
> >> Can someone verify that the following scenario should work?
> >>
> >> Spark DataGrid is extended and has a property test:String.
> >> Two custom item renderers check that property and if it's not set set
> it.
> >> if (myDataGrid(column.grid.dataGrid).test == "")
> >>     myDataGrid(column.grid.dataGrid).test = column.dataField;
> >>
> >> What I see is that both columns would have test property empty event
> >> though going thru debugger it's clear that it goes into one renderer
> then
> >> into another. So, why would second one still has this property not set?
> >>
> >> Thanks
> >>
> >
> >
>



-- 

João Fernandes

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message