2 Replies Latest reply on May 28, 2010 11:40 AM by levancho

    Bogus AsDoc on sortCompareFunctio

    levancho Level 3

          I was reading a sortCompareFunction doc and it says:

       

           *  If you specify a value of the <code>labelFunction</code> property,
           *  you must also provide a function to the <code>sortCompareFunction</code> property,
           *  unless sorting is not allowed on this column.

       

      now first of all,I dont think you MUST  specify sortCompareFunction  if you specify labelFunction,

      I have many labelFunction and not all of them have sortCompareFunction but they sort just fine,(regarding dataGrid)

      and on the other had I am curiouse to know why there is such a restriction, what does providing labelFunction has to do with sortCompareFunction ?

        • 1. Re: Bogus AsDoc on sortCompareFunctio
          Flex harUI Adobe Employee

          Ok, file a bug to have them remove the "must".  But the vast majority of

          folks do need a custom sortCompareFunction because the labelFunction returns

          results that don't follow the natural sort order of the dataField in the

          column.

          1 person found this helpful
          • 2. Re: Bogus AsDoc on sortCompareFunctio
            levancho Level 3

            because the labelFunction returns

            results that don't follow the natural sort order of the dataField in the

            column.

            IMHO, thats not true at all,as long as its a string or a number, they will get sorted, and for some corner cases  and not "vast majority"  ,

            sortFunction is in for the rescue.

             

            file a Bug ..

             

            P.S I am sorry but I do not qualify for that, so I cant  to file a bug to correct "must" in  ASDoc, I just epxressed my opinion about the subject and did receive confirmation that: it is not required.

            if its imperative to you, (to have Bug filed) , and you find it justifiable to remove  existence of that word in documentation,  feel free to do so.

             

            Kind Regards