1 Reply Latest reply on Feb 4, 2012 9:31 PM by Habeebul Jawad

    Adobe Flex

    Alpitha

      Hi,

       

      I am using ItemRenderer to one of the column in <mx:DataGrid>.
      But now the content height is fixed. How could i adjust height of ItemRenderer to the the content.

       

      Here is my code..

       

      In MainApp.mxml:
      --------------------------
      <mx:DataGrid headerBackgroundSkin="@Embed(source='/assets/Panel_headerSkin.png')" id="dG" headerStyleName="datagridHeader"  width="675" height="0" variableRowHeight="true"   includeInLayout="false"  >
      <mx:columns>
           <mx:DataGridColumn width="125" dataField="name" showDataTips="true"      dataTipField="name" headerText="Argument Name" wordWrap="true" />
            <mx:DataGridColumn id="argDesc" width="350" dataField="description" showDataTips="true" dataTipFunction="buildToolTip"     dataTipField="description" headerText="Argument Description" wordWrap="true" itemRenderer="com.att.ntscp.view.component.HtmlCellRender"/>
         <mx:DataGridColumn width="200" dataField="dbRef" headerText="Argument DBRef" wordWrap="true"/>
      </mx:columns>
      </mx:DataGrid>

      HtmlCellRender.mxml:
      ----------------------------
      <?xml version="1.0" encoding="utf-8"?>
      <s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"   xmlns:mx="library://ns.adobe.com/flex/mx"   focusEnabled="true" width="100%" maxHeight="100">
      <mx:TextArea id="taData" top="0" left="0" right="0" bottom="0" htmlText="{dataGridListData.label}" width="100%" height="100%" />
      </s:MXDataGridItemRenderer>