0
votes

I have a list component in the main view with custom itemrednerer as shown below

<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:android="http://schemas.android.com/apk/res/android">
<s:List id="lsRead"  dataProvider="{dp}" width="100%" height="100%">
 <s:itemRenderer>
<fx:Component id="rend">
 <s:ItemRenderer alternatingItemColors="[#DFDFDF,#EEEEEE]">
  <s:Label id="first" text="{data.nr}" visible="{bindableVariable_MainView}"/> 
      <s:Label id="second" text="{data.ar}" />
 </s:ItemRenderer>
</fx:Component>
 </s:itemRenderer>
</s:List>
</s:View>

I want to control the visibility of the "first" label using a bindable variable defined in the main view. How can I pass its value to the label defined in the itemrenderer?

Best Regards,

2

2 Answers

0
votes

I have use outerDocument and it solved the problem.

Thank you

0
votes

I have not used with but when I have to give any variable for renderer, I have make (customRenderer) class with usable variable and bind it with label.... and in main view Instead of , I take or and add component (customRenderer) in it... Thank You..

I dont know about "outerDocument".. Thanks for sharing...