Is it possible to show row count at Group level in ADG ie I want
to show no of row count at each level of grouping.
For Example :-
I am thinking of using filtering to acheive this but it would be great
if there is easy to way for it.
of course it's possible.
You can create a custom itemRenderer and add a field to show data.children.length() there. It's the best variant.
Thanks for the suggestion.
I have found the simplest way to do it. just need to provide implementation of groupLabelFunction of ADG
<mx:AdvancedDataGrid id="adg" groupLabelFunction="addChildCount">
private function addChildCount(data:Object,column:AdvancedDataGridColumn):String
//get the groupingCollection to get access to the group label property name
var grp:IGroupingCollection = tradeList.dataProvider.source as GroupingCollection2;
var grpLabelProperty:String = grp.grouping.label;
//get child count for the group
// this uses the fact that IHierarchicalData supplied as dataProvider to ADG gets
// converted to a IHierarchicalCollectionView. This converts all children to ICollectionViews if they are not already.
var childCount:int = tradeList.dataProvider.getChildren(data).length;
return data[grpLabelProperty] + "(" + childCount + ")";
Thats it ...
Hope this will help someone ..