Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Flex
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Flex
Getting DataGrid's height in ActionScript
Booma Devi
Ranch Hand
Posts: 61
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
<mx:DataGrid id="dg" width="469" height="332" dataProvider="{abc}"> <mx:columns> <mx:DataGridColumn headerText="Name" dataField="aaa"/> <mx:DataGridColumn headerText="Age" dataField="bbb" /> </mx:columns> </mx:DataGrid>
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
Posts: 53
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Add your AS inline with your MXLM using the <fx:Script> tag. Then, in your AS, say:
var datagrid:DataGrid = dg;
BTW, from other ActionScript,
you should
still be able to access dg. You would do so like so:
var dataGridComponent:TheCompYouMadeInView = new TheCompYouMadeInView(); var dataGrid:DataGrid = dataGridComponent.dg;
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Picture upload from flex RIA to MySql using java
having components based on Data Grid's column value.
Passing Flex objects to Java
using outerDocument in flex
Getting data from actionscript class file into Datagrid
More...