getting x and y position in advanced datagrid

Posted on 2011-10-21
Last Modified: 2012-06-27
hi guys

I have my grid like this

public class Tradegrid extends AdvancedDatagrid
override protected function drawRowBackgrounds():void{
var curRow:int = 0;
var i:int = 0;
var n:int = listItems.length;      
while (curRow < n)
if (listItems[curRow][0])
for(var k:Number=0;k< listItems[curRow].length; k++){
here   how can i get the 'x' and 'y' position of each cell?
Also how can i know the width and height of each cell ?

any help greatly appreciated
Question by:royjayd
    LVL 29

    Expert Comment

    What do you mean all cells are starting from position x and y 0
    width is columns width and height is rowHeight property of dataGrid
    LVL 29

    Accepted Solution

    Or you can get itemRenderer infomration

    override protected function drawRowBackgrounds():void{
                    for(var r:uint = 0; r < listItems.length; r++){
                        for(var c:uint = 0; c < listItems[r].length; c++){
                            var item:IListItemRenderer = listItems[r][c];
                            var rowData:BaseListData = rowMap[];
                            trace("x="+ item.x + ", y="+ item.y + ", w="+ item.width + ", h="+ rowInfo[rowData.rowIndex].height);

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    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…
    There are many benefits to finding online courses that align with your personal or career goals. Read more about our reasons for continuing your education in technology.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    746 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

    12 Experts available now in Live!

    Get 1:1 Help Now