Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
Am using this below code to update custom values.

XML
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="200" minHeight="200">
	<fx:Script>
		<![CDATA[
			import mx.collections.ArrayCollection;
			import mx.events.FlexEvent;
			
			import spark.events.TextOperationEvent;
			
			[Bindable]
			public var complexDP:ArrayCollection = new ArrayCollection(
				[   {ingredient:"Salmon", category:"Meat"}, 
					{ingredient:"Potato", category:"Starch"}, 
					{ingredient:"Cucumber", category:"Vegetable"}, 
					{ingredient:"Steak", category:"Meat"}, 
					{ingredient:"Rice", category:"Starch"}, 
					{ingredient:"Cumin", category:"Spice"}
				]                
			);
			
			private function myLabelToItemFunction(input:String):*
			{				
				return {ingredient:input, category:"mystery"};				
			}
		
	</fx:Script>
	<s:VGroup>
		<s:ComboBox id="cb" dataProvider="{complexDP}" width="150" labelToItemFunction="{myLabelToItemFunction}" selectedIndex="0" labelField="ingredient"/>
	</s:VGroup>
	 
	
</s:Application>


This function is used to set custom values.First time its working again i tried to make some changes in combobox textInput the old values in appears again and again.
Posted
Updated 5-Feb-15 21:12pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900