protected function formatURL(item:Object, column:DataGridColumn):String { column.itemRenderer = null; if (column.dataField == "URLData" ) { column.itemRenderer = new ClassFactory(UrlLinkButton); return item.URLData; } else if (column.dataField == "Name") // set up checks for other field names return item.Name; else return "ERR: No Field name defined"; }
<?xml version="1.0" encoding="utf-8"?> <mx:LinkButton xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" fontWeight="bold" color="#0000FF" label="{data.URLData}" click="openURL()"> <fx:Script> <![CDATA[ /** * Function that will parse current date and given URL info into a url string to be opened in a new page. **/ protected function openURL():void { trace("button clicked, attempt to parse to URL"); if (data.URLData) { // concatenate url string var url:String = "url information" + data.URLData + "maybe more url information"; trace("send drawing url request"); navigateToURL(new URLRequest(url)); } } ]]> </fx:Script> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> </mx:LinkButton>
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.