Re: Generic DataGrid Renderers

2021-03-23 Thread David Slotemaker de Bruine
egAvisosNet >>>>> >>>>>{ >>>>> >>>>>if(!data) >>>>> >>>>> return new CTypeRegAvisosNe

Re: Generic DataGrid Renderers

2021-03-23 Thread Piotr Zarzycki
>>>>else{ >>>> >>>> return data as CTypeRegAvisosNet; >>>> >>>>} >>>> >>>>} >>&

Re: Generic DataGrid Renderers

2021-03-23 Thread David Slotemaker de Bruine
return data as CTypeRegAvisosNet; >>> >>> } >>> >>>} >>> >>> >>> >>> (In my case I use a class type, but I imagine that with Object it will &g

Re: Generic DataGrid Renderers

2021-03-23 Thread Piotr Zarzycki
gt; >>} >> >> >> >> (In my case I use a class type, but I imagine that with Object it will be >> the same) >> >> >> >> Hiedra >> >> >> >> *De:* David Slotemaker de Bruine >> *Env

Re: Generic DataGrid Renderers

2021-03-23 Thread David Slotemaker de Bruine
> >} > > > > (In my case I use a class type, but I imagine that with Object it will be > the same) > > > > Hiedra > > > > *De:* David Slotemaker de Bruine > *Enviado el:* martes, 23 de marzo de 2021 12:39 > *P

Re: Generic DataGrid Renderers

2021-03-23 Thread David Slotemaker de Bruine
package utils.renderers { import org.apache.royale.jewel.itemRenderers.DataGridItemRenderer; public class StringDataGridItemRenderer extends DataGridItemRenderer { [Bindable] public var stringValue:String = ""; public override function set data(value:Object):void { super.data = value; stringValu

RE: Generic DataGrid Renderers

2021-03-23 Thread Maria Jose Esteve
my case I use a class type, but I imagine that with Object it will be the same) Hiedra De: David Slotemaker de Bruine Enviado el: martes, 23 de marzo de 2021 12:39 Para: users@royale.apache.org Asunto: Re: Generic DataGrid Renderers Yes: StringValue is a [Bindable] String var. that shoul

Re: Generic DataGrid Renderers

2021-03-23 Thread Piotr Zarzycki
Can you show me now full code of your item renderer ? wt., 23 mar 2021 o 12:39 David Slotemaker de Bruine < dslotema...@vicensvives.com> napisał(a): > Yes: > > itemRenderer="utils.renderers.StringDataGridItemRenderer"/> > > StringValue is a [Bindable] String var. that should hold the value of th

Re: Generic DataGrid Renderers

2021-03-23 Thread David Slotemaker de Bruine
Yes: StringValue is a [Bindable] String var. that should hold the value of the property "dataField" of the data Object. But as dataField evaluates de undefiend it get set to "". On Tue, 23 Mar 2021 at 12:26, Piotr Zarzycki wrote: > Do you setup dateField in your DataGrid Column? ;) > > What

Re: Generic DataGrid Renderers

2021-03-23 Thread Piotr Zarzycki
Do you setup dateField in your DataGrid Column? ;) What is the stringValue ? On Tue, 23 Mar 2021 at 12:17, David Slotemaker de Bruine < dslotema...@vicensvives.com> wrote: > Hi Piotr, > > I have tried overriding the set data method. The problem is that > "dataField" is undefined. > > public over

Re: Generic DataGrid Renderers

2021-03-23 Thread David Slotemaker de Bruine
Hi Piotr, I have tried overriding the set data method. The problem is that "dataField" is undefined. public override function set data(value:Object):void { super.data = value; stringValue = value[dataField]; this.text = stringValue; } stringValue is cast to "". Any thoughts? On Tue, 23 Mar 202

Re: Generic DataGrid Renderers

2021-03-23 Thread David Slotemaker de Bruine
OK! I will try that! On Tue, 23 Mar 2021 at 09:03, Piotr Zarzycki wrote: > If that's the case I would remove everything in that item renderer, > override property data and there filter: > > super.data = value; > if (!data) { > this.text = ""; > } > > wt., 23 mar 2021 o 08:57 David Slotemaker

Re: Generic DataGrid Renderers

2021-03-23 Thread Piotr Zarzycki
If that's the case I would remove everything in that item renderer, override property data and there filter: super.data = value; if (!data) { this.text = ""; } wt., 23 mar 2021 o 08:57 David Slotemaker de Bruine < dslotema...@vicensvives.com> napisał(a): > Yes! but I wanted to show that the

Re: Generic DataGrid Renderers

2021-03-23 Thread David Slotemaker de Bruine
Yes! but I wanted to show that the basic version is not working! My backend returns string constants for null objects and null numbers, I need to filter these out in the renderer. On Tue, 23 Mar 2021 at 08:39, Piotr Zarzycki wrote: > Hi David, > > It looks like your DataGridItemRenderer is do s

Re: Generic DataGrid Renderers

2021-03-23 Thread Piotr Zarzycki
Hi David, It looks like your DataGridItemRenderer is do same thing as the default one, what's the point of creating this one ? Are you going to expand it's functionality ? Thanks, Piotr wt., 23 mar 2021 o 08:31 David Slotemaker de Bruine < dslotema...@vicensvives.com> napisał(a): > Hi All, > >