How to add custom sorting to AdvancedDataGrid to worked on grouped Data?

Posted on 2009-06-29
Last Modified: 2013-11-11
I have an advancedDataGrid that I need to add custom sorting to it which overrides the original sort! my sorting should work using a combobox to select ascending and desending from with a sort button! I know this is a bug in flex that its original sorting only works in hierarchical data and not for groupingCollection
the dataProvider of my grid is a flat data. however, in the UI, the user can add grouping to the AdvancedDataGrid. so I want the sort to work on grouped data!
let's say the columns are : country, province, city. population and there is grouping on country and province
so the sorting should do the following:
1) if the user does a descending sort on country: only unitedStates will go up and Canada will go down.
2)if the user does a descending sort on province: the order of the grouping of province will change to Quebec, Ontario, British Columbia
3) if the user does a soring on city: although this is not a grouped column, it should do the sorting on all the cities.

Question by:honeybeeps
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 37

Expert Comment

ID: 24743668

Author Comment

ID: 24748268
Thanks zzynx! But would you please tell me how this is related to what I'm looking for? If you explain a little bit maybe I can figure it out
LVL 37

Accepted Solution

zzynx earned 500 total points
ID: 24750002
>> would you please tell me how this is related to what I'm looking for?
You asked
     >> I want the sort to work on grouped data!
That example allows sorting even when grouping is on. (press the button "Group on xxx" buttons).
That's why I thought it could be useful to you.

Author Comment

ID: 24817111
I'm busy building another component so I'll close this case for now, and hopefully we will figure it out later :) thanks for the help
LVL 37

Expert Comment

ID: 24820787
>> I'll close this case for now
OK...depending on what you mean by "closing"

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question