This content has been marked as final. Show 3 replies
Are you expecting the grouping to take place to different depths based on what is available and what is not available in different fields of data? It is a strange requirement.
We don't have any logic to deal with data items which have few properties missing. The logic expects all properties specified for grouping to be present.
The data being provided as input seems to be little peculiar. We need to understand the use case little more deeper before we can address the issue. Is it possible for you to provide sample data or sample app?
If you can show the output you are expecting as a image that would be great.
I currently have a work-around in mind but would like to test it with sample data before I can put forth the idea.
thanks - the best way to describe the way I expect to see the data would be as follows
New York 12,867
in this case the state level (california and new york) would not apply to Canada while it does for the US - currently I pass my data off to the grouping code with a continent, country and state - for the Canada records I leave the state blank but it populates the data at the state level in an empty box
By using a derived class of GroupingColection and overriding the getChildren function as follows you can get close to the desired behavior.
public class CustomGroupingCollection extends GroupingCollection
override public function getChildren(node:Object):Object
var result:Object = super.getChildren(node);
if(result && result.length == 1)
if (result[grouping.label] == "Not Available"
|| result[grouping.label] == "")
result = getChildren(result);
Some more checks and tweaking may be required.