<mx:DataGrid id="dgAutoFill" x="11" y="234" width="934" dataProvider="{rssHln.lastResult.rss.channel.item}">
<mx:columns>
<mx:DataGridColumn dataField="title" headerText="Titel"/>
<mx:DataGridColumn dataField="description" headerText="Omschrijving"/>
<mx:DataGridColumn dataField="pubDate" headerText="Publicatiedatum"/>
<mx:DataGridColumn dataField="link" headerText="Link"/>
</mx:columns>
</mx:DataGrid>
I’m trying to get the title from the selecteditem from this datagrid (which is filled by a rss-feed) in a label. I’ve searched for ways, but I can’t find how I should get this done.
This is the eventhandler I’ve added to the datagrid, and the function:
dgAutoFill.addEventListener(ListEvent.ITEM_CLICK, showDetails);
public function showDetails(event:ListEvent):void {
lblTitle.text = ?;
}
I think you want to create an click event handler, like this: