Hi Saravanan,

You can try this one.


[*Bindable*]

*private* *var* sampleArrayCollection:ArrayCollection = *new*ArrayCollection

([{empId:1001,empName:*"John"*,empAge:25},{empId:1002,empName:*"Kim"*
,empAge:35},

{empId:1003,empName:*"Guru"*,empAge:42},{empId:1004,empName:*"Shiv"*
,empAge:19},

{empId:1005,empName:*"Kim"*,empAge:36}]);

 *protected* *function* myCombo_closeHandler(event:DropDownEvent):*void
*

{

Alert.show((myCombo.selectedIndex).toString());

}

]]>

</fx:Script>

<s:ComboBox id="myCombo" dataProvider="{sampleArrayCollection}" labelField="
empName" close="myCombo_closeHandler(event)"/>

<mx:DataGrid dataProvider="{myCombo.selectedItem}"/>
Instead you need to get exactly inside the ArrayCollection that is the
object means you need to use For each (in) loop to dig inside the
arrayColection.


regards
elanpras

On Mon, Jan 3, 2011 at 11:42 AM, saravana kumar
<[email protected]>wrote:

> Hi All
>
> *i am using like this, i had got particular item index in  array
> collection *
>
>  [Bindable]
>  private var arrCB:ArrayCollection = new ArrayCollection( new
> Array('Test','sample') )  ;
>
>
> *i am using like this i cant get particular  item index. It always
> returning -1*
>
>  [Bindable]
>  private var arrCB:ArrayCollection = new ArrayCollection(new
> Array({label:'Test'},{label:'sample'}));
>
> *How can i get the item index.*
>
> Best Regards
> ESK
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>



-- 
Regards,
Prasanth

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to