Solved

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

Posted on 2008-10-08
3
1,007 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
  • 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

759 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now