Solved

How can you get the x,y coordinates of a datagrid headerRenderer in Flex?

Posted on 2008-10-08
3
1,017 Views
Last Modified: 2008-12-02
I am creating a headerRenderer for a datagrid, and the code works as expected, however I need to find the x,y coordinates of the content in the renderer.

I have tried tips/hints online, but nothing works -- it always gives back 0,0 as the coordinates, even when using the function to convert local to global.

Is there some trick to getting the actual x,y coordinates from inside a datagrid header component?  I believe the same problem exists for cells in itemrenderers.



var pt:Point = new Point(this.x,this.y); 
pt = localToGlobal(pt); 
 
pt.x SHOULD be the global X position, but is ALWAYS zero.
pt.y SHOULD be the global Y position, but is ALWAYS zero.

Open in new window

0
Comment
Question by:andrewschwabe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Expert Comment

by:ngiamouris
ID: 22676789
Are you calling the localToGlobal function of the datagrid object itself?
eg myGrid.localToGlobal(myPoint)
0
 

Author Comment

by:andrewschwabe
ID: 22712659
I wasn't and tried that just now, and no that doesn't work either -- it still returns 0,0 no matter what.  I think this must be a bug...
0
 
LVL 4

Accepted Solution

by:
ngiamouris earned 500 total points
ID: 22712708
Maybe you're trying to determine the coordinates before the actual component has been laid out. Try hooking on the updateComplete event and see if the coordinates still remain 0,0.
0

Featured Post

Defend Your Organization from The Greatest Threats

Looking to fill the gaps in your security? Bring together information from the network, endpoint and threat intelligence feeds to really see what's happening in your organization. Join the WatchGuardians in their adventures fighting cyber crime!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AS3 Image Edit Package 3 573
Flex 3 animation around the clock ..... 2 792
Looping thru 2 dim array 2 610
Adobe upload listbox 2 514
First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
A big percent of today’s marketing activity is performed through the online environment. The marketing strategies that have existed a decade ago no longer relate to what’s happening today. We’re currently facing a revolutionary era, called the digit…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question