PDA

View Full Version : CS3 Datagrid Component (HTML links)


rburns
04-30-2008, 02:59 PM
There has to be some way to get an html link to work in a CS3 Datagrid. I can't find anything on html links using Flash CS3 and Actionscript 3, which seems pretty remarkable to me. I'm surprised Adobe didn't code the datagrid to recognize when an html link is being clicked in the grid.

I've spent the last couple of days trying to do this with no success. I've emailed Adobe and received no response.

Has anyone successfully gotten an html link to work in a CS3 Datagrid? If so, please share.

rburns
04-30-2008, 08:17 PM
I was told to give this a try. Haven't done it yet, but will let you know if I have any success.

Create a custom event, have it bubble set to true, and put all the data you need on it.
That way, you can go:

myDataGrid.addEventListener("myCustomLinkClick", onClick);

function onClick ( event:MyCustomEvent )

And you can get all the info you need from event.

_______________________________________

package
{
import flash.events.Event;

public class MyEvent extends Event
{
public static const LINK_CLICK:String = "linkClick";


public var row:int;
public var column:int;

public function MyEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false):void
{
super(type, bubbles, cancelable);
}
}
}