4 Replies Latest reply on Nov 11, 2009 3:04 PM by TomDelorenzi

    Custom table header renderer

    TomDelorenzi

      I am trying to make a custom table header. I have seen some examples on the web such as

      <mx:DataGridColumn width="150" dataField="SalePrice" 
                      headerRenderer="myComponents.RendererDGHeader"/>

      where that class is a Box

      I also tried to inline it as such:
      <mx:DataGridColumn draggable="false" editable="true" headerText="Source RNC" headerStyleName="tableHeader" dataField="sourceRNC">
           <mx:headerRenderer>
                <fx:Component>
                     <mx:DataGridItemRenderer>
                          <s:Group/>    
                     </mx:DataGridItemRenderer>
                   </fx:Component>
           </mx:headerRenderer>
      </mx:DataGridColumn>
      In both these cases I get the following:
      VGroup declaration must be contained within the <Declerations>
      tag since it does not implement mx.core.IUIComponent
      Now clearly it does. Is this a bug or am I doing something
      wrong. My goal is for the table's header to have a combo
      box and a text field below the header's name to put filter
      options on the column(like hide values <5) etc

      Thanks, I know I have been posting a lot of questions lately