3 Replies Latest reply on Oct 20, 2010 10:36 PM by BhaskerChari

    Datagrid ItemRenderer with LinkButton.

    MoreGart111 Level 1

      I have one of the columns in my DataGrid which needs to be a LinkButton. The actual data value is 0 or 1 but I want the LinkButton to be visible only if the data value is 1. The problem is that LinkButton is always visible. How can I selectively make it visible or invisible on different rows of DataGrid ? I tried making the visible attribute bound with the value of the flag but no success.

       

      <mx:DataGridColumn itemRenderer="LinkButtonItemRenderer" dataField="flag" />

       

       

      Following is the LinkButtonItemRenderer code.

       

       

       

       

       

      <mx:LinkButton xmlns:mx="http://www.adobe.com/2006/mxml" visible="{data.flag == 1}"  label="Click Me" />