I have an external xml file and i want to display it in an advanced data grid....as in if i click the parent element the children have to be displayed in the corresponding columns...i'm trying it with my dataprovider but its not working. How do i do that?...
1
votes
Are you accessing the field names correctly (datafield="@yourField"), and have you using the HierarchicalData class for you XML?
- adamcodes
Maybe provide some code?
- bug-a-lot
@adam..i have done all that <mx:AdvancedDataGrid width="529" height="348" dataProvider="{new HierarchicalData(xmlList)}"> <mx:columns> <mx:AdvancedDataGridColumn dataField="@pid" headerText="PARENT"/> <mx:AdvancedDataGridColumn dataField="@uid" headerText="USER ID"/> </mx:columns> </mx:AdvancedDataGrid>
- Rahul
and my resultEvent function is.... public function results(event:ResultEvent):void { xmlList=user.lastResult.users; } here user is my HTTPService id and users is my root element..
- Rahul
and this is my xml file....saved user.xml <users> <PARENT pid="12345"> <userid uid="aaaa"/> <userid uid="bbbb" /> </PARENT> <PARENT pid="54321"> <userid uid="cccc" /> </PARENT> </users>
- Rahul