Hey Thanks Jagan,
But i am trying to co-relate two combo boxes. Suppose I have an xml
file with details of week days,months,colours... So when i select a
particular item in the first combo box(say colour),it should display
the names of colours like(red,blue,green...) in the other combo box. I
hope you got what i'm trying to say.
Thanks,
Sindhu.

On Apr 21, 5:47 pm, Jagadish M <[email protected]> wrote:
> Hi sindhu,
>
> check out this code it may help you..
>
> *1.xml*
>
> <employeeDB>
>     <tblEmpDetails>
>         <empdetails>
>      <empId>1001</empId>
>      <empname>J</empname>
>      <empsalary>10000</empsalary>
>      <empgender>Male</empgender>
>   </empdetails>
>         <empdetails>
>      <empId>1002</empId>
>      <empname>Ja</empname>
>      <empsalary>20000</empsalary>
>      <empgender>Male</empgender>
>    </empdetails>
>          <empdetails>
>      <empId>1003</empId>
>     <empname>Jag</empname>
>     <empsalary>30000</empsalary>
>     <empgender>Male</empgender>
>    </empdetails>
>          <empdetails>
>      <empId>1004</empId>
>      <empname>Jaga</empname>
>      <empsalary>60000</empsalary>
>      <empgender>FeMale</empgender>
>       </empdetails>
>          <empdetails>
>      <empId>1004</empId>
>      <empname>Jagan</empname>
>      <empsalary>65000</empsalary>
>      <empgender>FeMale</empgender>
>       </empdetails>
>     </tblEmpDetails>
>  </employeeDB>
>
> *DisplayinCombo.mxml*
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="vertical"
> initialize="srv.send()" >
>  <mx:Script>
>   <![CDATA[
>    import mx.collections.ArrayCollection;
>    import mx.controls.Alert;
>    import mx.controls.Label;
>    import mx.rpc.events.ResultEvent;
>    import mx.rpc.events.FaultEvent;
>    var arremp:ArrayCollection=new ArrayCollection;
>    private function rsevent(e:ResultEvent)
>    {
>     arremp=e.result.employeeDB.tblEmpDetails.empdetails;
>     cb1.dataProvider=arremp;
>    }
>     private function flevent(e:FaultEvent)
>    {
>     Alert.show('fault '+e.fault.toString());
>    }
>   ]]>
>  </mx:Script>
>  <mx:HTTPService id="srv" url="1.xml" result="rsevent(event)"
> fault="flevent(event)"/>
>  <mx:ComboBox id="cb1" dataProvider="{arremp}" labelField="empname"/>
> </mx:Application>
>
> On Tue, Apr 21, 2009 at 3:29 PM, Sindhu <[email protected]> wrote:
>
> > Hi,
> > Has anyone tried getting data of countries,states,districts from an
> > xml file and displaying it in flex using combo boxes??
> > Regards,
> > Sindhu.
>
> --
> Thanks & Regards,
>
> Jagan Mady's

--~--~---------~--~----~------------~-------~--~----~
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