Thanks for this tip.

But, I came across another thing.

How would I set the width of the column so that it matches the width of the 
itemrenderers inside it?

Apparently, setting the width to 100% for the datagrid column is not allowed.

Thanks.

Angelo


________________________________
From: Christopher McArthur <[email protected]>
To: [email protected]
Sent: Thu, 20 May, 2010 17:14:06
Subject: RE: [flexcoders] Set Width of An Item Renderer Component Based on 
Visible Property of the Control

  
the "includeInLayout" property may also be helpful to
you in this case, try:
includeInLayout="{outerDocument. fncVisible( )}"
 
From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On 
Behalf Of Angelo
Anolin
Sent: Thursday, May 20, 2010 2:46 PM
To: flexcod...@yahoogro ups.com
Subject: [flexcoders] Set Width of An Item Renderer Component Based on
Visible Property of the Control
 
  
Hi
FlexCoders,
 
I
have declared an in-line item renderer in my datagrid:
 
<mx:DataGridColumn
headerText="Test" textAlign="center"
sortable="false">
  <mx:itemRenderer>
  
 <mx:Component>
  
   <mx:HBox horizontalAlign="center" >
  
     <mx:LinkButton id="lnk1" label="Link
1" visible={outerDocum ent.fncVisible( )}" width="{???}"/>
  
     <mx:LinkButton id="lnk1" label="Link
1" />
  
     <mx:LinkButton id="lnk1" label="Link
1" />
  
   </mx:HBox>
  
 </mx:Component>
  </mx:itemRenderer>
</mx:DataGridColumn>
 
 
as
you may see, I am determining the visibility of the link button via a function.
 What I want to achieve is that if the linkbutton contrl is invisible, the
width should be 0, but if it is visible, then width should be 100.
 
How
do I pass in a function for the width of the control whether it's visibility is
set to true or false?
 
Thanks.
 
 


      

Reply via email to