Hi all,

I have a custom header renderer being used by every column in my
datagrid (about 20-30 columns).   With this header renderer being used,
scrolling the grid horizontally is slowed down significantly.  Below is
the relevant code to define the renderer.  Any suggestion of how to
speed things up? (I can't remove the Canvas layer even though it only
contains a HBox due to other reason).  Should I be writing the header
renderer in a different manner?  Any good example of a high performed
header renderer anyone is willing to share?  Any help would be greatly
appreciated.

Regards,
Ban

<mx:Canvas>
     <mx:HBox id="hbox"
         name="{data.headerText}"
         paddingTop="0"
         width="100%" height="100%"
         horizontalScrollPolicy="off"
         verticalScrollPolicy="off"
         textAlign="left">
         <mx:Label id="headerLabel"
             text="{StringUtil.trim(data.headerText)}"
             paddingRight="0"/>
         <mx:LinkButton
icon="@Embed(source='/datagrid/assets/filter.gif')"
             mouseDown="toggleFilter(event)"
             visible="{!(filterType is NoFilter)}"
             paddingLeft="0" paddingRight="0"/>
         <mx:LinkButton id="statButton"
         visible="{dataGrid.filterControls[fieldName].filterApplied}"
         paddingRight="0"
         icon="@Embed(source='/datagrid/assets/ico_filter_off.png')"
         mouseDown="clearFilter(event)"/>
     </mx:HBox>
</mx:Canvas>


Reply via email to