2009-05-29 111 views
0
<mx:DataGrid visible="false" id="dgPosts" width="365" click="" dataProvider="{sendReq.lastResult.loginsuccess.name}" x="140.5" y="169"> 
      <mx:columns> 
       <mx:DataGridColumn headerText="name" dataField="name"/> 
      </mx:columns> 
     </mx:DataGrid> 

當我點擊一個特定的數據項時,相應的網站必須打開。我試過dgPosts.selectedItem.name,但它不工作。在dataGrid中創建鏈接

我得到的結果作爲XML ....

回答

0

this頁,創建您的DataGrid的itemClick事件處理程序。在該函數中指定爲點擊處理程序,從DataGridEvent事件中獲取所需的數據。在獲得所需格式的url之後,使用navigateToUrl函數轉到該鏈接。