Objects in Array...doesn't get more newbie than this!

Hi!

I have:


//dataGrid is a DataGrid declared earlier
var cols:Array = dataGrid.columns;
trace(cols);

If I test/debug this I get:

[object DataGridColumn],[object DataGridColumn],[Obje…

But I want to access the ‘dataField’ property of each DataGridColumn in the array ‘cols’.

How do I do that?


var len:uint = cols.length;
for (var i:int = 0; i < len; i ++) {
  trace(cols*.dataField);
};

Tackar tack! :wink:

Funny post by the way in the Random section…:beer2:

//Kenwio