Hi Preetham,
Thank you for the answer. Should we provide a sortCompareFunction for
every dataGridColomn? can't we set the values "test2" and "test3" in a
parameter, so we can make only one function like this?:

private function compareFunc(itemA:XML, itemB:XML):int {
                var valueA:String = itemA[parameter].text();
                var valueB:String = itemB[parameter].text();
                return ObjectUtil.stringCompare(valueA, valueB);
            }


On Aug 20, 6:06 pm, Preetham Hegde <preethamheg...@gmail.com> wrote:
> Hi Zied,
>
> You might have missed something... Its ok refer the example in this link,
> if any doubt pls try to give a simplified code, it will help us to 
> helphttp://blog.flexexamples.com/2008/04/09/creating-a-custom-sort-on-a-d...
>
>
>
> On Thu, Aug 20, 2009 at 6:32 PM, zied Majdoub <zied.e...@gmail.com> wrote:
>
> > Hi,
> > I have a dataGrid with a dataProvider an XML file filled with Ids. I
> > added in the column a labelFunction in order to return a name related
> > to the id.
> > But when i sort the column, it's sorting by the id value, not the
> > label. When I use a sortCompareFunction, I can't look for the name,
> > because I only have obj1:XML and obj2:XML but no information about
> > which column I am sorting.
>
> > Please help me find a way to do the correct sort.
>
> > Thanks,
> > Zied
>
> --
> Regards,
> Preetham Hegdewww.dizzianer.com
>
> _______________________________________________
> If you only have a hammer, you tend to see every problem as a nail.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to flex_india@googlegroups.com
To unsubscribe from this group, send email to 
flex_india+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to