4 Replies Latest reply on Jul 16, 2010 5:40 AM by victor_shamo

    Advanced DataGrid Group Data Representation - Customize way

    victor_shamo

      Hi,

      ArrayCollection:

      Group                   SubGroup           Items    Val1       Val2        Val3
      Goup1                 Sub Group 1       Item 1   123         123         123
      Group1                 Sub Group 1       Item 2   123         123         123
      Group1                 Sub Group 2       Item 3   123         123         123
      Group1                 Sub Group 2       Item 4   123         123         123
      Group1                 Sub Group 3       Item 5   123         123         123
      Group1                 Sub Group 3       Item 6   123         123         123

      I want to group the data and display the above data in following format (mention below). Please help how to achieve and is it possible using Adobe Flex?

      I have tried with groupCollection and Groupfield but unable to get the desired format. Require your guidance. Your help will be appreciated!!!

      Desired Format

      Group

      Sub Group

      Items

      Value 1

      Value 2

      Value 3

       

      Sub Group 1

      Item 1

      Xxx

      Xxx

      xxx

       

       

      Item 2

      Xxx

      Xxx

      Xxx

       

      Total

       

      XXX

      XXX

      XXX

      Group 1

       

      Item 3

      Xxx

      Xxx

      Xxx

       

      Sub Group 2

      Item 4

      Xxx

      Xxx

      Xxx

       

      Total

       

      XXX

      XXX

      XXX

       

      Sub Group 3

      Item 5

      Xxx

      Xxx

      Xxx

       

       

      Item 6

      Xxx

      Xxx

      Xxx

       

      Total

       

      XXX

      XXX

      XXX

       

      Grand Total

       

      XXXXX

      XXXXX

      XXXXX

       

      Thanks,
      Victor

        • 1. Re: Advanced DataGrid Group Data Representation - Customize way
          leybniz Level 4

          As a possible solution: Transform ArrayCollection to mx:HierarchicalData

          and use AdvancedDataGrid.treeColumn.

          As to your data structure, the Tree model has to be more preferable to store and operate with, than a plain collection you are using now.

          • 2. Re: Advanced DataGrid Group Data Representation - Customize way
            victor_shamo Level 1

            HI,

             

            Thanks for your reply,

             

            How would i include Sub Group Total and Grand Total if i use Hierarchical Data ?

             

            Thanks,

            Victor

            • 3. Re: Advanced DataGrid Group Data Representation - Customize way
              leybniz Level 4

              Totals could be sparate entities, pre-calculated during aggregative conversion from ArrayCollection you have to Tree structure. This way You'll have Read-only model. For all times Custom things requires custom solutions

              • 4. Re: Advanced DataGrid Group Data Representation - Customize way
                victor_shamo Level 1

                 

                 

                Hi,

                Thanks for your reply...

                 

                Plz Guide me how to get the total under sub group column and colour them. Please refer image given...

                I am new bie to advance datagrid. Please guide how to get...

                 

                private var dpHierarchy:ArrayCollection = new ArrayCollection([
                                  {Group:"Group", children: [
                                     {SubGroup:"SubGroup", children: [
                                         {BSGroup:"SUbSubGroup", children:[
                                         {Item:"Item 1", Val1:30566, Val2:40000},
                                        {Item:"Total SubGroup", Val1:99999, Val2:99999}]}
                                        ]} 
                                  ]}

                 

                re.jpg

                a. Can we get rid of these yellow blank areas and make the data compact?

                b. Can i bring Total SubGroup Text Under SubGroup column.

                c. SubGroup column and Sub Group Total can be of same colour. Is this is possible ?

                 

                Please guide your help would really help!!!!

                 

                 

                Thanks,
                Victor