Datagrid Advance ArrayCollection geçen sorun. Gibi benim ArrayCollection yapısı `
private var groupList:ArrayCollection = new ArrayCollection([
{Country:'India', children:[
{Country:'Series1', children:[
{Matches:'India Test series 1',isEnable:false,id:1,isSelected:true},
{Matches:'India Test series 2',isEnable:false,id:2,isSelected:true},
{Matches:'India Test series 3',isEnable:false,id:3,isSelected:true}]},
{Country:'Series2', children:[
{Matches:'Australia Test series 1',isEnable:false,id:25,isSelected:true},
{Matches:'Australia Test series 2',isEnable:false,id:26,isSelected:true},
{Matches:'Australia Test series 3',isEnable:false,id:27,isSelected:true}]}
]},
{Country:'Austrila', children:[
{Country:'Series1', children:[
{Matches:'Australia Test series 1',isEnable:false,id:46,isSelected:true},
{Matches:'Australia Test series 2',isEnable:false,id:47,isSelected:true},
{Matches:'Australia Test series 3',isEnable:false,id:48,isSelected:true}]},
{Country:'Series2', children:[
{Matches:'Australia Test series 1',isEnable:false,id:49,isSelected:true},
{Matches:'Australia Test series 2',isEnable:false,id:50,isSelected:true},
{Matches:'Australia Test series 3',isEnable:false,id:51,isSelected:true}]},
{Country:'Series3', children:[
{Matches:'Australia Test series 1',isEnable:false,id:52,isSelected:true},
{Matches:'Australia Test series 2',isEnable:false,id:53,isSelected:true},
{Matches:'Australia Test series 3',isEnable:false,id:54,isSelected:true}]}
]}
dataProvider AD'nin geçen = "{Yeni HierarchicalData (groupList)}" Bu çalışma para cezası bulunuyor. bu ağaç ve ülkeye göre çocuk iki menüsünü göstermek var. Ama aşağıdaki kodu tarafından ArrayCollection dinamik xml dönüştürmek çalıştı
private function convertXmlToArrayCollection( file:String ):ArrayCollection
{
var xml:XMLDocument = new XMLDocument( file );
//var decoder:SimpleXMLDecoder = new SimpleXMLDecoder();
var decoder1:SimpleXMLDecoder = new SimpleXMLDecoder(true);
var data1:Object = decoder1.decodeXML( xml );
var array1:Array = ArrayUtil.toArray(data1);
return new ArrayCollection( array1 );
}
benim xml yapısı
<Country Country="India ">
<Country Country="Series ">
<Matches Matches="BIndependiente-Colon" id="701536" isEnable="false" isSelected="true" startDate="2009-10-29 01:30:00" EndDate="2009-10-29 01:30:00"/>
<Matches Matches="Boca Juniors-Chacarita Juniors" id="701633" isEnable="false" isSelected="true" startDate="2009-10-29 19:00:00" EndDate=""/>
</Country>
</Country>
<Country Country="Australia">
<Country Country="series">
<Matches Matches="BIndependiente-Colon" id="701536" isEnable="false" isSelected="true" startDate="2009-10-29 01:30:00" EndDate="2009-10-29 01:30:00"/>
<Matches Matches="Boca Juniors-Chacarita Juniors" id="701633" isEnable="false" isSelected="true" startDate="2009-10-29 19:00:00" EndDate=""/>
</Country>
</Country>
Yani ben arryacollection xml kod bu formatı dönüştürmek için çalıştı, eğer dizi koleksiyon çevirdim ama ben veri ızgara Advance geçecek zaman herhangi bir sonuç göstermez. Ne ben yanlış yaptım?
groupList1= convertXmlToArrayCollection(string1);
Alert.show(groupList1[0].Country[0].Matches[0].id.toString());// output is =701536
Nerede i hata mı? Plz lütfen biri bana bakın, ben ne değişmiş olacak?