Hi all,

I have an xml file in this way.

********   details.xml  ********

<?xml version="1.0" encoding="UTF-8"?>
<contactlist>
    <contact id="1">
        <country>Argentina</country>
        <contactname>Robert</contactname>
    </contact>
    <contact id="2">
        <country>Argentina</country>
        <contactname>Alex</contactname>
    </contact>
    <contact id="3">
       <country>Bolivia</country>
       <contactname>Alex</contactname>
    </contact>
    <contact id="4">
       <country>Argentina</country>
       <contactname>Rose</contactname>
    </contact>
    <contact id="5">
        <country>Argentina</country>
        <contactname>Robert</contactname>
    </contact>
    <contact id="6">
       <country>Korea</country>
       <contactname>Rose</contactname>
    </contact>
</contactlist>

____________________________________________


Flex Application File

************  Main.mxml *******************

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"; 
verticalGap="0" horizontalGap="0">

<mx:Model id="myData" source="details.xml"/>

<mx:VBox>
  <mx:Label text="TestPage" styleName="appTitle" />
<mx:HBox horizontalGap="2" height="100%" width="100%">
<mx:Canvas width="700" height="300">
  <mx:Panel title="Details" id="main" height="300" width="700">
  <mx:Form id="details" marginLeft="30" defaultButton="clearButton" 
visible="{details.height>0}" width="670" height="200">
    <mx:FormItem label="Country">
           <mx:ComboBox  labelField="contryN" width="200" />
    </mx:FormItem>
        <mx:Spacer height="25"></mx:Spacer>
    <mx:FormItem label="Contact Name">
        <mx:ComboBox labelField="Cname" width="200" />
    </mx:FormItem>
        </mx:Form>
</mx:Panel>
</mx:Canvas>
</mx:HBox>
<mx:HBox horizontalGap="4" height="100%" width="100%">
  <mx:Panel title="Data Grid" id="mainWin" height="100%" width="100%">
   <mx:DataGrid id="content" height="100%" width="100%" >
    <mx:columns>
      <mx:Array>
                <mx:DataGridColumn headerText="Country" 
columnName="country" />
        <mx:DataGridColumn headerText="Contact Name" 
columnName="cname" />
      </mx:Array>
    </mx:columns>
  </mx:DataGrid>
   </mx:Panel>
</mx:HBox>
</mx:VBox>
</mx:Application>

__________________________________

In flex I have two combo components. In the first combo box I want to 
load all the country names in it. when i select one country i need to 
load all contactnames for that perticular contry in 2nd combo.

When I change the country in the first combo box I want the contact 
name also to be changed. It's something like data binding. 

The selected country's name and contactnames should come in to
the datagrid component also. Can anybody please help me out. I am new 
to 
the Flex.



Thanks in advance���..
Will be eagerly waiting for some response

regards,
Pathy







 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to