简体   繁体   中英

Creating link in dataGrid

 <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>

When i click on a particular dataItem, the corresponding website must open. I have tried dgPosts.selectedItem.name but its not working.

I am getting the result as XML....

As per this page, create an itemClick event handler on your DataGrid. In the function specify as the click handler, get the data you need from the DataGridEvent event. After you have the url in the format you need, use the navigateToUrl function to go to that link.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM