troubleshooting Question

I want to generate combo boxes dynamically in Flex 3 with an ArrayCollection, having success until returning only one record

Avatar of rarid122481
rarid122481 asked on
Adobe FlashApache Flex
3 Comments1 Solution319 ViewsLast Modified:
When my arraycollection returns more than one row, i have success generating my dynamic text fields and combo boxes. I am attaching code and screen shots.
private function skuOptionsHandler(event:ResultEvent):void
		{
			acOptionTypeName = event.result.options.optionTypeName as ArrayCollection;
			for(var i:int; i < acOptionTypeName.length; i++)
			{
				var optText:Text = new Text();
				optText.x = optTextX;
				optText.y = optTextY;
				details.addChild(optText);
				optTextY += 30;
				optText.text = acOptionTypeName[i].name + ": ";
				
				var optCombo:ComboBox = new ComboBox();
				optCombo.x = optComboX;
				optCombo.y = optComboY;
				details.addChild(optCombo);
				optComboY += 30;
				acOptionArray = event.result.options.optionTypeName[i].option as ArrayCollection;
				optCombo.dataProvider = acOptionArray;
				optCombo.labelField = "value";
				//optCombo.value = "id";
			}
		}
Untitled-1-0001-ac-that-works.jpg
Untitled-1-0002-ac-that-doesnt-w.jpg
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros