This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Flex and the fly likes Getting DataGrid's height in ActionScript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "Getting DataGrid Watch "Getting DataGrid New topic
Author

Getting DataGrid's height in ActionScript

Booma Devi
Ranch Hand

Joined: Nov 02, 2011
Posts: 61
Hi,

Can any one please send me small example of how to get the Datagrid's id in Action Script...?


For Example

I am having the below mxml say Grid.mxml in view package

I want to use the DataGrid id "dg" in my custom action script... model package... (mxml and actionscript in different package).. how to use the id...?

Please help...
Alvin Watkins
Ranch Hand

Joined: May 25, 2011
Posts: 53
Add your AS inline with your MXLM using the <fx:Script> tag. Then, in your AS, say:



BTW, from other ActionScript, you should still be able to access dg. You would do so like so:


 
Don't get me started about those stupid light bulbs.
 
subject: Getting DataGrid's height in ActionScript