Navigate to URL from DataGrid as selection changed
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script>
import mx.collections.ArrayCollection;
import flash.net.*;
[Bindable]
public var list:ArrayCollection;
</mx:Script>
<mx:VBox>
<mx:DataGrid id="myDG" dataProvider="{list}" width="100%" change="navigateToURL(new URLRequest(myDG.selectedItem.link),'_blank');" >
<mx:columns>
<mx:DataGridColumn headerText="Posts" dataField="title" />
<mx:DataGridColumn headerText="Date" dataField="pubDate" width="100" />
</mx:columns>
</mx:DataGrid>
</mx:VBox>
</mx:Application>
Related examples in the same category