Creating link in dataGrid

荒凉一梦 提交于 2019-12-25 04:33:24

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/925850/creating-link-in-datagrid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!