I am trying to bind XML that has hyphens in the element names to a DataGrid.
If I declare
something like this:
<mx:DataGridColumn dataField="asset-id" headerText="Asset ID"/>
and use the Service/Model Proxy pattern, I can load the data from an
HTTPService.
However, I can't seem to bind other elements to the asset ID of the selected
item in the
DataGrid. I've looked through the postings here and it seems that some variant
of
selectedItem.(@["asset-id"]) should work, but I haven't figured out the proper
incantation
yet.
I've also tried creating a variable in the parent document to hold the value
and bind to that
in other child components like this:
public function changeHandler(event:Event):void
{
parentDocument.currentAssetID_ =
event.target.selectedItem.(@["asset-id"]);
}
but I got some unhelpful runtime errors.
Has anyone done this successfully?
Thanks,
Sean
PS: Yes, I am new to Flex.