A quick example:

<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml" creationComplete="onAppInit()">
    <mx:Script>
        import mx.collections.ArrayCollection;

        var dgDP:ArrayCollection;
        var cbDP:ArrayCollection
        function onAppInit()
        {
            var songs:Array = [
                        {song:"A", rating:5, artistId:1},
                        {song:"B", rating:10, artistId:2},
                        {song:"V", rating:4, artistId:3},
                        {song:"D", rating:3, artistId:4}
                        ];
            dgDP = new ArrayCollection(songs);
            dg.dataProvider = dgDP;

            var singers:Array = ["Singer_A", "Singer_B", "Singer_C", "Singer_D"];
            cbDP = new ArrayCollection(singers);
            cb.dataProvider = cbDP;
        }
       
    </mx:Script>
    <mx:DataGrid id="dg" width="100%">
        <mx:columns>
            <mx:DataGridColumn columnName="song" headerText="Song" />
            <mx:DataGridColumn columnName="rating" headerText="Rating" />
        </mx:columns>
    </mx:DataGrid>

    <mx:ComboBox id="cb" selectedIndex="{dg.selectedItem.artistId-1}"/>
</mx:Application>

-abdul


On 3/6/06, rgwilson26 <[EMAIL PROTECTED]> wrote:
I would like to know how to tie a datagrid selection to a combo box.
When the user selects a datgrid selection it will change the label
shown on a specified combobox.

Thanks,





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
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/






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to