Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flex > Flex 2, 3 & 4

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-21-2008, 11:27 PM   #1
showmehow
Registered User
 
Join Date: Dec 2008
Posts: 11
Default How to assign click to datagrid with ActionScript??

Is there a way to assign a click property to a datagrid in actionscript?

I have a datagrid generated fully within actionscript with id='dg'
Because it is created wholly within action script and not mxml, i cannot use the click mxml property of the datagrid.

I have tried:

dg.click=doFunction();

and it is telling me this is an undefined property 'click'

I am trying to call a function on mouse click within this datagrid with actionscript3.

Thanks
Showmehow
showmehow is offline   Reply With Quote
Old 12-21-2008, 11:35 PM   #2
showmehow
Registered User
 
Join Date: Dec 2008
Posts: 11
Default

Got it sorted
dg.addEventListener(MouseEvent.CLICK,doFunction);
showmehow is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying child node data within a datagrid frank grimes Components 10 11-01-2007 09:21 PM
On button click, insert small thumbnail into Datagrid? jarmanje ActionScript 2.0 1 06-08-2007 06:17 AM
Proper way to bind data to the DataGrid component - Best practices. andrea_muta Components 1 04-03-2007 09:13 AM
How do I click a button on the stage with ActionScript? Glen Charles Rowell ActionScript 2.0 5 06-26-2006 12:54 PM
after button click actionscript being ignored racerMX ActionScript 1.0 (and below) 2 04-07-2004 10:38 PM


All times are GMT. The time now is 03:19 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.