Hi
This works!!
 
Thanks.

Matt Chotin <[EMAIL PROTECTED]> wrote:

You should have access to mods as a 2-d array.

 

mods[i][j]

 

every mods[i] is the array of checkboxes for the listModules repeater.

 

For (var i:Number=0; i < mods.length; i++)

{

  For (var j:Number=0; j < mods[i].length; j++)

  {

    Trace(mods[i][j].label + ‘ = ‘ + mods[i][j].selected);

  }

}

 

Haven’t tested this but this should hopefully get you on track.

 

Matt

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Husain Kitabi
Sent: Friday, October 21, 2005 8:35 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] checkbox in repeater

 

Hi

I am having a repeater -> repeater -> checkbox.

 

<mx:Repeater id="list" dataProvider="{courseDtos}">

<mx:HBox mouseDown="slideOpen(event.target.repeaterIndices[0])">

<mx:Label text="{list.currentItem.courseName}"/>

</mx:HBox>

 

<mx:VBox id="detail" marginLeft="10" marginBottom="10" height="0" vScrollPolicy="off" hScrollPolicy="off">

<mx:Repeater id="listModules" dataProvider="{list.currentItem.modules}">

 

<mx:CheckBox id="mods" label="{listModules.currentItem.moduleName}"/>

</mx:Repeater>

</mx:VBox>

 

</mx:Repeater>

 

 

I need the values of mods. I tried the following in my script

 

function getSelectedModules(){

 

var len= list.dataProvider.length;

var str = "";

for(var j=0;j<len ;j++){

for(var i=0; i<listModules[j].dataProvider.length;i++){

str = str + '\n' + listModules[j].mods[i].label;

}

 

}

mx.controls.Alert.show("Checbox  :"+ str);

}

 

This returns me undefined. Any ideas how to get checkbox values

 

Regards



hussain


Yahoo! FareChase - Search multiple travel sites in one click.



hussain


Yahoo! FareChase - Search multiple travel sites in one click.

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to