How could I pass a value into a headerrenderer so that I can use that value to perform a specific action in the renderer?
For example here is my renderer: <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Label text="Hello"/> <mx:Image height="20" source="info.gif" click="Alert.show('Hello World!', 'Message')"/> <mx:Script> <![CDATA[ import mx.controls.Alert; ]]> </mx:Script> </mx:HBox> I would like to display something other than hello world for the alert or even pass multiple variables in to determine how the renderer will be created. For example something to determine which icon to show. Here is my code that dynamically creates the columns: private function LoadColumns(event:ResultEvent):void { //Creating an array from an httpservice var cols:Array = ArrayUtil.toArray (columns.lastResult.Columns.Column); var newCols:ArrayCollection = new ArrayCollection(); //Looping through the columns and setting the properties var count:int = cols.length; for(var x:int = 0; x < count; x++) { var dgCol:DataGridColumn = new DataGridColumn(cols[x].Heading); dgCol.dataField = "Data" + x.toString(); dgCol.headerRenderer = new ClassFactory(HeaderDefinition); //OK Here I would like to set the properties //dgCol.headerRenderer.someProperty = someValue newCols.addItem(dgCol); } dg.columns = newCols.toArray(); //Send the httpservice that contains the data for these columns data.send(); } What do I need to do to pass a couple variables into the headerRenderer?? Thanks in advance for any help!!! </Torey> ------------------------ Yahoo! Groups Sponsor --------------------~--> Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/