4 Replies Latest reply on Jun 4, 2009 6:51 AM by ligouane

    datagrid itemrenderer list rowcount not changing with data


      I have a datagrid with an itemrenderer.  the itemrenderer is a list component.  I populate the list with different values for each datagrid row.  this works fine.  However, I want the list to reset the rowcount for each datagrid row.  This is not happening.  if the first datagrid row list box is 3 rows every list box in that column is 3 rows no matter what i do.  here's my code:



      <mx:List xmlns:mx="http://www.adobe.com/2006/mxml" rowCount="1">
         import mx.utils.ObjectProxy;
         import mx.collections.ArrayCollection;
         import mx.utils.ArrayUtil;
         [Bindable] private var arr:Array;
         override public function set data( value:Object ) : void 
          super.data = value; 
          if(value != null && value.MEET is ArrayCollection)
           var len:Number = value.MEET.length;
           arr = new Array();
           for each (var obj:ObjectProxy in value.MEET){
           this.dataProvider = arr;
           //labelField = "DAYS";
           this.rowCount = len;
          else if (value != null && value.MEET is ObjectProxy )
           this.rowCount = 1;
           this.dataProvider = value.MEET;
           this.labelField = "DAYS";
           this.rowCount = 1;