PDA

View Full Version : [AS3] dataGrid and objects / classes


Mo1990
09-17-2008, 07:45 PM
Hello,

I'm having a big problem with a dataGrid and a class that I want to display. I want to feed a dataProvider with an array of objects. The object structure is:

var name:String;
var age:Number;
var adr:adressclass;

adressclass is another class:
var street:String;
var city:String;

I create columns in the dataGird named 'name', 'age' and 'adr'.
Within the 'street' column I just get the value [object adr].

Question: what do I have to write in the dataGrids addColumn(???) to specify that I want adr.street. I've tried addColumn(adr.street) and (adr["street"]) but nothing works (I get empty cells)

Any idea ?

Thanks Mo