1 Reply Latest reply on Apr 6, 2009 6:00 AM by SujitG

    Change ItemRendere Properties in DATAGRID

    Pratap Reddy
      Hi,

      I created a DATAGRID with some Itemrenderers in it.

      I am trying to change the properties of itemrendere on rollOver of DATAGRID.

      code:

      Code:

      <mx:DataGrid id="dataGrid" dataProvider="{targetProfiles}" itemRollOver="onItemRollOver(event)" itemRollOut="hideMenu(event)">
      <mx:columns>
      <mx:DataGridColumn id="nameCol" dataField="Name"
      headerText="Name" itemRenderer="components.itemrenderer.labelName">
      </mx:DataGridColumn>
      <mx:DataGridColumn id="description"
      dataField="Description"
      headerText="Description" />
      </mx:DataGrid>

      code for ITem Renderer

      Code:

      <?xml version="1.0"?>
      <!-- dpcontrols/adg/myComponents/ChartRenderer.mxml -->
      <mx:VBox height="65" width="100%" xmlns:mx=" http://www.adobe.com/2006/mxml" verticalAlign="middle">

      <mx:HBox paddingLeft="20" paddingTop="5" verticalAlign="bottom">
      <mx:Label text="{data.Name}"/>
      </mx:HBox>

      <mx:HBox horizontalAlign="right" verticalAlign="bottom">
      <mx:Button id="options" text="Options" visible="false"/>
      </mx:HBox>

      </mx:VBox>

      Now what am trying to do is.. On rollOver and rollOut of particular row in datagrid i want to make that Button in Itemrender visible true/false(on selected row).

      Any idea how to identify the itemRenderer on rollOver of grid????

      Thanks & Regards
      Pratap