9 Replies Latest reply on Mar 16, 2011 1:56 AM by shotterrss

    DataGrid with Renderers

    shotterrss

      Hi,

      In my project,I use the renderers handling data in the DataGrid,set variableRowHeight= "true",code:
      <mx:DataGrid id="archiveAchiveList"
      width="200"
      height="102" width="200"
      variableRowHeight="true"
      scroll="archiveAchiveList.invalidateList();archiveAchiveList.setFocus()"
      verticalScrollPolicy="on"
      dataProvider="{Model.InfoList}">
      <mx:columns>
      <mx:DataGridColumn headerText="Structure Name"
      dataField="structName"
      width="200"
      wordWrap="true"
      color="black"
      itemRenderer="components.renderers.ClickHtmlTextListItemRenderers"/>

       

      ClickHtmlTextListItemRenderers,code:
      <?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"
      initialize="init()">
      <mx:Text id="txt" width="100%" top="0" left="0" right="0" bottom="0" text="{dataGridListData.label}" click="itemClickHandler(event)"/>
      </s:MXDataGridItemRenderer>

       

      Now the problems is, the data in the DataGrid displays the exception.

      Like the picture below:

      bug.PNG

      Please suggest.

       

      Thansk and regards,

      Shotterrss