No, test value needs to be outside of a renderer.
On Fri, Oct 4, 2013 at 12:02 PM, João Fernandes < [email protected]> wrote: > 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 <[email protected]> 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 <[email protected]> > > wrote: > > > > > I do callLater from prepare to update this property. > > > > > > > > > On Fri, Oct 4, 2013 at 10:14 AM, Maurice Amsellem < > > > [email protected]> wrote: > > > > > >> In what method do you make the check in the custom itemRenderer ? > > >> > > >> -----Message d'origine----- > > >> De : mark goldin [mailto:[email protected]] > > >> 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 >
