handycam
08-07-2007, 05:01 PM
I've got two data grids. Elements can be dragged from one to the other. The first grid is populated by a binding to a data provider, an XMLList The second grid has not data provider, as it's empty to start.
At some point, I need to get the contents of the second grid, so that I can use the data elsewhere.
What property am I looking for of the second grid?
<mx:HBox width="100%" height="100%">
<mx:DataGrid id="chooseList" dataProvider="{_choices}" width="100%" height="100%" wordWrap="true" variableRowHeight="true" dragEnabled="true" dropEnabled="true" dragMoveEnabled="true">
<mx:columns>
<mx:DataGridColumn dataField="@ln1" headerText="{_prompt}"/>
</mx:columns>
</mx:DataGrid>
<mx:DataGrid id="choiceList" width="100%" height="100%" wordWrap="true" variableRowHeight="true" editable="true" dropEnabled="true" dragEnabled="true" dragMoveEnabled="true">
<mx:columns>
<mx:DataGridColumn dataField="@qty" headerText="Quantity" width="30"/>
<mx:DataGridColumn dataField="@units" headerText="" width="40"/>
<mx:DataGridColumn dataField="@ln2" headerText=""/>
</mx:columns>
</mx:DataGrid>
</mx:HBox>
At some point, I need to get the contents of the second grid, so that I can use the data elsewhere.
What property am I looking for of the second grid?
<mx:HBox width="100%" height="100%">
<mx:DataGrid id="chooseList" dataProvider="{_choices}" width="100%" height="100%" wordWrap="true" variableRowHeight="true" dragEnabled="true" dropEnabled="true" dragMoveEnabled="true">
<mx:columns>
<mx:DataGridColumn dataField="@ln1" headerText="{_prompt}"/>
</mx:columns>
</mx:DataGrid>
<mx:DataGrid id="choiceList" width="100%" height="100%" wordWrap="true" variableRowHeight="true" editable="true" dropEnabled="true" dragEnabled="true" dragMoveEnabled="true">
<mx:columns>
<mx:DataGridColumn dataField="@qty" headerText="Quantity" width="30"/>
<mx:DataGridColumn dataField="@units" headerText="" width="40"/>
<mx:DataGridColumn dataField="@ln2" headerText=""/>
</mx:columns>
</mx:DataGrid>
</mx:HBox>