Hi Jeff

You are right. I worked for me after your pointer.

Thanks
ilikeflex




________________________________
From: Jeffry Houser <[email protected]>
To: [email protected]
Sent: Monday, May 25, 2009 8:30:22 AM
Subject: Re: [flexcoders] Label is npt displayed for LinButton as Itemrenderer






It doesn't work like that. You're going to need to create your own 
class that extends the link button, and responds to the dataChange event 
to set the LinkButton's text as the label from your data Object. 

Code like this, basically, exists in the default itemRenderer. 

ilikeflex wrote:
> Hi
>
> I am using mx.controls. LinkButton as itemrenderer in datagrid. But the label 
> is not displayed of the LinkButton. I am using the below sample code. I know 
> it is very simple. I am missing something...
> Please help.
>
> Thanks
> ilikeflex
>
>
> <?xml version="1.0" encoding="utf- 8"?>
> <mx:Application xmlns:mx="http://www.adobe. com/2006/ mxml" layout="vertical" 
> verticalAlign= "top" creationComplete= "init()"
> horizontalAlign= "center" backgroundGradientC olors="[0x000000 ,0x323232] " 
> paddingTop=" 0" viewSourceURL= "srcview/ index.html" >
>
> <mx:Script>
> <![CDATA[
> import mx.collections. ArrayCollection;
> [Bindable]
> public var collection:ArrayCol lection = new ArrayCollection( );
> var processObject: Object = { label:"Process1" , code1:"1", code2:"0"};
> var processObject2: Object = { label:"Process2" , code1:"0", code2:"1"};
> 
> public function init():void
> {
> collection.addItem( processObject) ;
> collection.addItem( processObject2) ;
> } 
> 
> ]]>
> </mx:Script>
> <mx:DataGrid dataProvider= "{collection} " width="100%" height="100% ">
> <mx:columns>
> <mx:DataGridColumn dataField="label" headerText=" Process" itemRenderer= 
> "mx.controls. LinkButton" />
>
> </mx:columns>
> </mx:DataGrid>
> </mx:Application>
>
>
>
> ------------ --------- --------- ------
>
> --
> Flexcoders Mailing List
> FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder sFAQ.txt
> Alternative FAQ location: https://share. acrobat.com/ adc/document. do?docid= 
> 942dbdc8- e469-446f- b4cf-1e62079f684 7
> Search Archives: http://www.mail- archive.com/ flexcoders% 40yahoogroups. 
> comYahoo! Groups Links
>
>
>
>
> 

-- 
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl. com/684b5h
http://www.twitter. com/reboog711 | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust





      

Reply via email to