i used advance datagrid of dataProvider as HierarchicalData . it's an my array collection strature
private var groupList:ArrayCollection = new ArrayCollection([
{Country:'India', children:[
{Matches:'India Test series 1',isEnable:false},
{Matches:'India Test series 2',isEnable:false},
{Matches:'India Test series 3',isEnable:false}]},
{Country:'Australia', children:[
{Matches:'Australia Test series 1',isEnable:false},
{Matches:'Australia Test series 2',isEnable:false},
{Matches:'Australia Test series 3',isEnable:false}]},
{Country:'japan', children:[
{Matches:'Australia Test series 1',isEnable:false},
{Matches:'Australia Test series 2',isEnable:false},
{Matches:'Australia Test series 3',isEnable:false}]},
]);
i want to get particular data like matches details and count which one is (isEnable==true) value . so convert HierarchicalCollectionView to Array like
var hCollView:HierarchicalCollectionView = updategrid.dataProvider as HierarchicalCollectionView;
var hCollData:HierarchicalData = hCollView.source as HierarchicalData;
var hArrayColl:ArrayCollection = hCollData.source as ArrayCollection;
var hArray:Array = hArrayColl.source as Array;
for(var i:Number=0;i<hArray.length;i++)
{
Alert.show(hArray[i].Country);
if(hArray[i].isEnable=="true")
{
count1++;
}
}
It shows only country details but if i tried matches and isEnable not found in array . How can i found is isEnable and matches details ? Please refer me