Use can use labelFunction to format values. http://livedocs.adobe.com/flex/201/langref/mx/controls/dataGridClasses/DataGridColumn.html#labelFunction
HTH, Ben --- In [email protected], "captnjay_mobile" <[EMAIL PROTECTED]> wrote: > > I'm still rather new to flex.. so forgive me if I'm not going about this > the right way. > I want to simply change the value of data within datagrid, based on some > criteria. > In this case, I have records coming back athat are either active or > inactive. > > In the database these values are 0' and 1's, but I'd like to display > either "Active" or "Inactive" instead. > > Do I need to use a itemrenderer in this case? Or is there a simpler way? > > When I run the code below, it doesn't likt the use of data.blnActive... > > <mx:DataGridColumn headerText="Active?" dataField="blnActive"> > <mx:itemRenderer> > <mx:Component> > <mx:Label id="activeLabel" > text=""> > <mx:Script> > <![CDATA[ > > > if(data.blnActive == 0) > { > > activeLabel.text = 'False' > } > else > { > > activeLabel.text = 'True' > } > > ]]> > </mx:Script> > </mx:Label> > </mx:Component> > </mx:itemRenderer> > </mx:DataGridColumn> >

