Can anybody help ? --- In [email protected], "parinda_b_patel" <[EMAIL PROTECTED]> wrote: > I need a datagrid column header texts to wrap over different lines for > which I have created a headerRenderer. But now the problem is that > applying the headerRenderer , I loose the default ability to sort on > the datagrid and It does not fire headerRelease event at all.Here is > my code > : > > <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" > width="100%" height="100%" > xmlns:sl ="sl.core.*" > xmlns:renderers="sl.core.renderers.*" > > defaultButton="okBtn" creationComplete="performInit();" > > > <mx:HBox width="100%" height="100%"> > <mx:Label fontWeight="bold" text="Phone Number List" /> > <mx:DataGrid id="phonelist_dg" headerHeight="40" width="100%" > height="100%" > > <mx:columns> > <mx:Array> > <mx:DataGridColumn columnName="No" headerText="No > (COUNT)" /> > <mx:DataGridColumn columnName="Phone" > headerText="Phone" /> > > </mx:Array> > </mx:columns> > </mx:DataGrid> > </mx:HBox> > > > <mx:Script><![CDATA[ > > function performInit(){ > var scope = this; > phonelist_dg.getColumnAt(0).headerRenderer = HeaderRenderer; > phonelist_dg.dataProvider = new Array({No : 1, > Phone:"1234567890"} , {No:2 , Phone:" 9876543210"}); > > } > ]]></mx:Script> > </mx:Application> > > ================================================================ > AND BELOW IS THE HEADERRENDERER CODE : > ================================================================ > <mx:VBox verticalGap="0" > xmlns:mx="http://www.macromedia.com/2003/mxml" > width="100%" height="100%" > hScrollPolicy="off" vScrollPolicy="off" > > <mx:Text id="h" width="50%" height="50%" textAlign="left" > mouseUp="listOwner.dispatchEvent({type:'mouseUp'});" > mouseDown="listOwner.dispatchEvent({type:'mouseDown'});" /> > <mx:Text id="t" width="50%" height="50%" textAlign="left" > mouseUp="listOwner.dispatchEvent({type:'mouseUp'});" > mouseDown="listOwner.dispatchEvent({type:'mouseDown'});" /> > > > <mx:Script><![CDATA[ > > import mx.controls.Label; > import mx.utils.Delegate; > import mx.controls.DataGrid ; > > // The DataGrid this belongs to > var listOwner:DataGrid; > > > function setValue(str:String, item:Object, sel:Boolean) > { > h.text = str.substring(0, str.lastIndexOf("(")); > t.text = str.substring( str.lastIndexOf("("), str.length); > > } > > ]]></mx:Script> > </mx:VBox> > > ================================================== > > I do not see any sorting arrow on the grid any more and if somebody > clicks on the header text itself it does not sort at all. > > Please help.
------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/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/

