1 Reply Latest reply on Jan 23, 2008 7:53 PM by ntsiii

    Repeater Qs

    trycold Level 1
      Hi,

      I have a grid in which some rows I want to create using a repeater. I tried doing like this but it won't work. What's the best way to do it. If I give Grid at the top level then it works instead of gridRow in the component but I don't want to create so many grids. I want this component to be a part of my earler grid.

      <mx:Grid>
      <mx:GridRow>
      <mx:GridItem >
      <mx:Label text="Type" />
      </mx:GridItem>
      <mx:GridItem>
      <mx:Label text="Pay" />
      </mx:GridItem>
      <mx:GridItem>
      <mx:Label text="Start Date" />
      </mx:GridItem>...
      </mx:GridRow>
      <mx:Repeater >
      <view:LeaveRepeater typeLeave="{leaveRep.currentItem}" id="leaveRepeater" />
      </mx:Repeater>

      </mx:Grid>
      where leaveRepeater is
      <mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml" >
      <mx:Script>
      <![CDATA[
      [Bindable]
      public var typeLeave:Object;

      ]]>
      </mx:Script>

      <mx:GridRow> <mx:GridItem >

      <mx:Label id="Line" text="{typeLeave.Line}" />
      </mx:GridItem>
      <mx:GridItem>
      <mx:ComboBox dataProvider="{pArray}" id="Pay" />
      </mx:GridItem>
      <mx:GridItem>
      <mx:TextInput id="SDate" />
      </mx:GridItem>

      </mx:GridRow>
      </mx:Canvas>