Loading ...
Sorry, an error occurred while loading the content.

Re: AdvancedDataGrid sortable column headers

Expand Messages
  • Prashant
    Hi Scott, Please share code if you have received any answer related to your post. I also want same scenario at my project. Thanks in advanced.
    Message 1 of 4 , Apr 30, 2011
    • 0 Attachment
      Hi Scott,
      Please share code if you have received any answer related to your post. I also want same scenario at my project.

      Thanks in advanced.


      --- In flexcoders@yahoogroups.com, Scott Melby <smelby@...> wrote:
      >
      > Can anybody tell me how to make the sortable column headers on an
      > AdvancedDataGrid look like the headers on a regular DataGrid? All I
      > want is the header text and the sort direction arrow. I'd rather not
      > have the separator and sort number.
      >
      > Thanks
      > Scott
      >
      > --
      > Scott Melby
      > Founder, Fast Lane Software LLC
      > http://www.fastlanesw.com
      >
    • Lars Östling
      Hi, setting sortExpertMode to true on the AdvancedDataGrid should take care of the separator. To get rid of the sort number you could use a custom
      Message 2 of 4 , May 2 7:19 AM
      • 0 Attachment
        Hi,

        setting sortExpertMode to true on the AdvancedDataGrid should take care of the separator. To get rid of the sort number you could use a custom sortItemRenderer that hides the text field, try the following:

        package com.flexceptional.components

        {

            import mx.controls.advancedDataGridClasses.AdvancedDataGridSortItemRenderer;

            import mx.core.UITextField; 


            public class SimplerSortItemRenderer extends AdvancedDataGridSortItemRenderer 

            {


                public function  SimplerSortItemRenderer() 

                {

                }

                

                override protected function childrenCreated():void 

                {

                    super.childrenCreated(); 

                    // Get reference to sort number text field 

                    var sortOrderTextField:UITextField = this.getChildAt(0) as UITextField; 

                    if (sortOrderTextField) 

                    { 

                        // Hide sort number text field 

                        sortOrderTextField.includeInLayout = false;

                        sortOrderTextField.visible = false

                    }

                } 

            }

        }


        Good luck!

        Thanks,
        Lars

        On Sun, May 1, 2011 at 8:29 AM, Prashant <prashantkoshta@...> wrote:
         

        Hi Scott,
        Please share code if you have received any answer related to your post. I also want same scenario at my project.

        Thanks in advanced.

        --- In flexcoders@yahoogroups.com, Scott Melby <smelby@...> wrote:
        >
        > Can anybody tell me how to make the sortable column headers on an
        > AdvancedDataGrid look like the headers on a regular DataGrid? All I
        > want is the header text and the sort direction arrow. I'd rather not
        > have the separator and sort number.
        >
        > Thanks
        > Scott
        >
        > --
        > Scott Melby
        > Founder, Fast Lane Software LLC
        > http://www.fastlanesw.com
        >


      Your message has been successfully submitted and would be delivered to recipients shortly.