Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


getting x and y position in advanced datagrid

Posted on 2011-10-21
Medium Priority
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
  • 2
LVL 29

Expert Comment

ID: 37010222
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

dgofman earned 1400 total points
ID: 37010272
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[item.name];
                        trace("x="+ item.x + ", y="+ item.y + ", w="+ item.width + ", h="+ rowInfo[rowData.rowIndex].height);

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
The deadly train derailment that occurred recently in DuPont, Washington, raises a lot of questions. It was a new route, the first trip tested with passengers, and the train was travelling at 50 mph over the zone’s speed limit. Could IoT play a role…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses

579 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