tags:

views:

511

answers:

1

I'm trying to render a Flex datagrid using an external XML datasource. Is there a way I can specify in the XML that a cell element should appear as a hyperlink?

A: 

you can make a datarenderer for a specified column that is called "html" and then style the content of that column. If you XML has a

<html>http://www.google.com&lt;/html&gt;

you can get this value in the datarenderer with

override public function set data(value:Object):void
            {
                super.data = value;    
            }

<mx:button label="{data.html}" 
      click="{navigateToURL(new URLRequest('http://www.google.com'), '_self');}"/>

I hope this helps

Arno