handycam
08-04-2007, 02:31 AM
i seem to be unable to get the selectedItems for this DataGrid:
<mx:DataGrid id="choiceList" dataProvider="{_choices}" width="100%" height="100%" wordWrap="true" variableRowHeight="true">
<mx:columns>
<mx:DataGridColumn dataField="@ln1" headerText="Field 1"/>
</mx:columns>
</mx:DataGrid>
I used trace("Choices ="+choiceList.selectedItems);
but only get the Choices= part.
If I use selectedIndices, I get the number of the item selected.
What's up with that?
FWIW, The data provider is from the parent app, I'm displaying only the ln1 attribute in the xml.
[Bindable]
public var _choices:XMLList;
private function assignListData():void {
_listData0 = _xmlData.step.ingredientList[0].items.item;
s1._choices = _listData0;
}
"s1" is the component that this code is in.
<mx:DataGrid id="choiceList" dataProvider="{_choices}" width="100%" height="100%" wordWrap="true" variableRowHeight="true">
<mx:columns>
<mx:DataGridColumn dataField="@ln1" headerText="Field 1"/>
</mx:columns>
</mx:DataGrid>
I used trace("Choices ="+choiceList.selectedItems);
but only get the Choices= part.
If I use selectedIndices, I get the number of the item selected.
What's up with that?
FWIW, The data provider is from the parent app, I'm displaying only the ln1 attribute in the xml.
[Bindable]
public var _choices:XMLList;
private function assignListData():void {
_listData0 = _xmlData.step.ingredientList[0].items.item;
s1._choices = _listData0;
}
"s1" is the component that this code is in.