Hi

Flex newbie so be gentle.

I've got a function to create a new colummn in a grid ...

             private function addBlankDataGridColumn(dataField:String):void
            {
                var dgc:DataGridColumn = new DataGridColumn(dataField);
                dgc.headerText="hi2";
                dgc.headerRenderer="VDGHeader";
                var cols:Array = musicDatagrid.columns;
                cols.push(dgc);
                musicDatagrid.columns = cols;
            }

This works fine apart from the line 

dgc.headerRenderer="VDGHeader";

I can set the headerRenderer="VDGHeader" as a parameter in predefined columns 
and it works fine, but in the function above it causes the following error

1067: Implicit coercion of a value of type String to an unrelated type 
mx.core:IFactory.

I've tried

dgc.setHeaderRenderer("VDGHeader");

but no luck.

Can you set the headerRenderer dynamically?

Thanks

Brian


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5880
Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to