0 Replies Latest reply on Jun 4, 2007 3:08 PM by TigerLittle

    DataGrid when set variableRowHeight=true, the Image in the itemRenderer can't show up

    TigerLittle Level 1
      http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=cellrenderer_072_28.html

      the above is the flex example. I did my code almost same as this example. But I do different way in renderer code.
      The example:
      <?xml version="1.0"?>
      <mx:HBox xmlns:mx=" http://www.adobe.com/2006/mxml"
      horizontalAlign="center" >
      <mx:Image id="albumImage" height="175" source="{data.Cover}"/>

      My code:
      <?xml version="1.0"?>
      <mx:VBox xmlns:mx=" http://www.adobe.com/2006/mxml"

      public function init():void{
      var hbox:HBox = new HBox();
      var img:Image = new Image();
      var lbl:Label = new Label();
      img..source = data.Image;
      lbl.text = data.Revision;


      <mx:HBox id="releasedBox">

      The different is I add my image in AS code but not in mxml code. And the problem is when I set variableRowHeight=true, the datagrid can display my label, but image can’t display. And when mouse over, the data line is blinking. When you click one line, there can show the image for 1 sec.

      If I set variableRowHeight=false. It works fine.

      Anyone knows what’s this problem? Thanks