How can you make a Datagrid's Image-based itemRenderer either visible or not, depending on the value


the description same title.  related post made little while ago: why image-based itemrenderer visible? datafield that's being used itemrenderer's column in case "ongoing", , want set itemrenderer and/or image true or false, depending on value of ongoing in row.  if itemrenderer label-based, i'm able set text different values, depending on that.  specific properties, visible, problematic though.  documentation i've found far on using states difficult follow, , i'm not sure apply here.  how do this?  current code, way follows:

 

<mx:datagridcolumn datafield="ongoing" id="ongoing" headertext="">
<mx:itemrenderer>
   
<mx:component>
       
<mx:image source="logo.jpg">
           
<mx:script>
                <![cdata[
                    override public function set data(value:object):void {
                        super.data = value;
                        super.visible = (value.ongoing != 'false');
                    }
                ]]>
           
</mx:script>
       
</mx:image>
   
</mx:component>
</mx:itemrenderer>
</mx:datagridcolumn>

 

i've tried working set visible override.  thanks!



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support