views:

128

answers:

1

Hi,

I am creating a Datagrid dynamically in AS3. In MXML it is valid to write:

mx:DataGridColumn dataField="abc" id="testColumn"

in AS3 however, I can not use the property "id", it is not found. Any ideas?

var dgc : DataGridColumn = new DataGridColumn();
dgc.id = "testColumn"; (NOT WORKING)

Thanks, martin

+2  A: 

The id is not a real property, but only a way to define the variable name in mxml. Therefore in your case the ID is "dgc".

What are you trying to achieve, by the way?

luca
Thanks! I am trying to add a summary footer to the datagrid, and the summary column needs to refer to the ID of a "real" datagrid column.http://code.seanhess.net/?p=17
martin