0 Replies Latest reply on Dec 29, 2009 4:51 AM by asaad970

    Presinting HierarchicalData and AdvancedDataGrid







          I have an ArrayCollection (accounts) as a result of calling getallaccounts service call witch contains the data of the

      table chartofAccounts witch have this structure or fields :







      and so on ..

      for each account there is a parent account except the top level accounts witch is level 1 its parent accounts is its own

      so i need to present that hierarchical data in the advancedDataGrid , starting from level 1 then for each account in level one

      comes the child accounts in level 2 and for each account in level 2 comes the child account in level 3 and so on ..


      the data should appear like that


      1 assets

                  101 fixd assets

                                   10101 lands

                                   10102  buildings

                                               10101001 buiding 1

                                                10101002 buiding 2


                                  10102 cars

                                          10102002 car1

                                          10102003 car2

      2 liabilities

                   201 Capital

                   202001 short term liabilities



      i am really tierd from keeping trying to do it , even i thought to use the tree controler

      can any body help in that


      i tryed to use that cade :


      <mx:AdvancedDataGrid id="adg1"  designViewDataType="tree"
                                   width="100%" height="20%"
                      <mx:GroupingCollection id="gc" source="{AccChart}"
                              <mx:Grouping >
                                  <mx:GroupingField name="AC_LEVEL" />
                                  <mx:GroupingField name="AC_MAINAC_NO" />
                  <mx:HierarchicalData id="gc" source="{AccChart}"
                  childrenField="AC_LEVEL" />
                  <mx:AdvancedDataGridColumn dataField="AC_NAME" />
                  <mx:AdvancedDataGridColumnGroup headerText="DETAILS">
                  <mx:AdvancedDataGridColumn dataField="AC_MAINAC_NO"/>
                  <mx:AdvancedDataGridColumn dataField="AC_NAME"/>
                  <mx:AdvancedDataGridColumn dataField="AC_ANAME"/>


      and this what i got http://msmdk.selfip.com:8500/accounts/bin-debug/accounts1.html