Hey there,
I'm adding columns to the "columns" array for a datagrid without any difficulty. Except for when i try to specify the Header Renderer.

We're building a new column object by writing AS code like :

newColumn.dataField = columnObj.dataField;
newColumn.wordWrap = columnObj.wordWrap;

And we push this onto the columns array and that works fine.



But how do i say that i want the header renderer for the new column to be the one that's defined in "cmpHeader.mxml" in the current directory?
Things like the following don't work:

var myHeaderRenderer:DataGridItemRenderer = new DataGridItemRenderer (cmpHeader.mxml);
newColumn.headerRenderer = myHeaderRenderer;

-- or --

newColumn.headerRenderer = "cmpheader.mxml";

-- or --

newColumn.headerRenderer = cmpHeader;


Thanks!
marky

Reply via email to