My apologize, I forgot the columns property returns a display object, not the data itself. Since a DataGrid lists it's data by row and not columns, you may need to do something like this:
Code:
<?xml version="1.0"?>
<!-- DataGrid control example. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
private var myCBDataProvider:ArrayCollection;
private function updateComboBox(): void {
var columnData:ArrayCollection = new ArrayCollection();
for each( var row:Object in idDataGrid.dataProvider ) {
columnData.addItem(row.name.toString());
}
myCBDataProvider = columnData;
}
]]>
</mx:Script>
<mx:XMLList id="idEmployees">
<employee>
<name>Christina Coenraets</name>
<phone>555-219-2270</phone>
<email>[email protected]</email>
<active>true</active>
</employee>
<employee>
<name>Joanne Wall</name>
<phone>555-219-2012</phone>
<email>[email protected]</email>
<active>true</active>
</employee>
<employee>
<name>Maurice Smith</name>
<phone>555-219-2012</phone>
<email>[email protected]</email>
<active>false</active>
</employee>
<employee>
<name>Mary Jones</name>
<phone>555-219-2000</phone>
<email>[email protected]</email>
<active>true</active>
</employee>
</mx:XMLList>
<mx:Panel title="DataGrid Example" height="100%" width="100%"
paddingTop="10" paddingLeft="10" paddingRight="10">
<mx:DataGrid id="idDataGrid" width="100%" height="100%" rowCount="5" dataProvider="{idEmployees}">
<mx:columns>
<mx:DataGridColumn dataField="name" headerText="Name"/>
<mx:DataGridColumn dataField="phone" headerText="Phone"/>
<mx:DataGridColumn dataField="email" headerText="Email"/>
</mx:columns>
</mx:DataGrid>
<mx:ComboBox id="idComboBox" dataProvider="{myCBDataProvider}" />
<mx:Button label="Update ComboBox" click="updateComboBox();" />
</mx:Panel>
</mx:Application>
But again, I can't tell you the exact implementation you should use without seeing the code. The best way to do it really depends on a lot of different factors.
Hope this was more of a help,
...aaron