11 Replies Latest reply on Mar 19, 2009 11:54 AM by augur_guan

    AdvancedDataGrid

    GeorgeWS Level 1
      I have a ADG and it gets populated with an ArrayCollection, this works fine. When I try and add grouping the ADG stay empty. I have looked at Forta.com and that looks good so I try and match whats going on and as soon as I use the GroupingCollection like this

      <mx:dataprovider>
      <mx:GroupingCollection id="gc" source="{myWine}">
      <mx:grouping>
      <mx:Grouping>
      <mx:GroupField name="DIVNNO"/>
      </mx:Grouping>
      </mx:grouping>
      </mx:GroupingCollection>


      <mx:colums>

      Then I display the columns: DIVNNO and SLMNSD But there never is any data that shows If I show just the ADG It works and if I switch to the Heirarchial data it displays the data so the data part works what else could be wrong?
      I am also doing the refresh in the RO like the instructions say.
      Is it because its an ArrayCollection?

      Thanks
      George
        • 1. Re: AdvancedDataGrid
          flexstone Level 1
          I have similar trouble with ADG until I realized how critical the timing of the called to gc.refresh() really is. - If you call it before the gc has time to be generated it will not display in the ADG. Test it by adding a button that will manual gc.refresh() when clicked....
          • 2. Re: AdvancedDataGrid
            GeorgeWS Level 1
            I wish that were the case. i tried a bunch of placements for the refresh, even a button as you suggested. I get an error:
            Cannot access a property or method of a null object reference

            But I know its getting the data. If I change it to a regular ADG without the grouping it populates. This should be so easy. Any other thoughts?

            G

            • 3. Re: AdvancedDataGrid
              flexstone Level 1
              I know when I have a large set of data it is very slow to propagate into the ADG - and data display can be weird with text displaying as tiny specks until the ADG properties are invalidated.

              Is your ADG nested deep into viewstacks or other container ?
              • 4. Re: AdvancedDataGrid
                GeorgeWS Level 1
                I have had problems with containers in the past so I have it just inside a panel. My data set is large I will try for a smaller set to see it work hopefully. Thanks
                • 5. Re: AdvancedDataGrid
                  GeorgeWS Level 1
                  I made it so there are less than 1000 records that would only have 8 groups. Still just blank and when I press a button to trigger the refresh I get the null error. That cannot be to many can it?
                  • 6. Re: AdvancedDataGrid
                    flexstone Level 1
                    OMG - my ADG with 200 items is so sluggish and flakey I would expect major issue with 1000 records.... I am looking for alternatives. Dont remember having this much trouble with Tree list....

                    It maybe that formatting the data into HD as the dataSource will improve performance - anyone have any input on that idea ?
                    • 7. Re: AdvancedDataGrid
                      GeorgeWS Level 1
                      Im thinking the ADG is almost useless. The only reason I would want to group data is because it is so large. I want to use more like 100,000 with 25 groups. So Im gathering that the Flex is not reall up to this task. What are other people doing? I still have not even gotten it to work from the beginning of my post. I guess If I want to see it work I will need to use 200 records.
                      • 8. Re: AdvancedDataGrid
                        flexstone Level 1
                        Okay - I solved my problem and have ADG grouping working using the method illustrated here -

                        http://flexpearls.blogspot.com/2008/01/using-advanceddatagrid-as-tree-control.html

                        This was very helpful.

                        The method that seems to work the best is to format the data before Flex gets it. In my case I created the hierarchial data structure in the XML on the server - then be sure DO NOT use the grouping function for the ADG.

                        This improves response times dramatically and the list retains the sorting of the original XML.

                        I too, was about to give up on ADG as a solution but now my confidence is renewed. After investing 8+ hrs I am happy to be able to use this moving forward.
                        • 9. Re: AdvancedDataGrid
                          Rifaet
                          Hi!
                          i have xml file with repeating data, and i want to display one item av repeatingsdata.
                          my exmpl:
                          <leksem visningsord="A" filnavn="A"/>
                          <leksem visningsord="abonnere" filnavn="abonnere">
                          <grupper gruppe="number"/>
                          </leksem>
                          <leksem visningsord="abort" filnavn="abort">
                          <grupper gruppe="number"/>
                          </leksem>
                          <leksem visningsord="absolutt 1" filnavn="absolutt-1"/>
                          <leksem visningsord="absolutt 2" filnavn="absolutt-2"/>
                          <leksem visningsord="abstinens" filnavn="abstinens">
                          <grupper gruppe="number"/>
                          </leksem>
                          the grupp name "number" i want to com in my grupp list just one time, and i traid diffrents actions but no result.

                          thax 4 help
                          Rifaet
                          • 10. Re: AdvancedDataGrid
                            GeorgeWS Level 1
                            I also had small victory with the hierarchical data but this note stops me.

                            Note: Summary data is not supported for hierarchical data represented by the HierarchicalData class. You can only create summary data for data represented by the GroupingCollection class.

                            So my search will continue...
                            • 11. Re: AdvancedDataGrid
                              augur_guan
                              Don't so frustrated. I have used ADG to display 100,000 records and grouped by 5 columns. It works fine, fast and stable. I also met the blank page when I tried to group them, but I fixed it by setting its filter to null.

                              Don't trust me that I am happy with ADG. I have my own issue, because it will crashed when I loaded them many times. The memory used by browser kept rising if I monitor the windows task manager.

                              ADG has abundant feature enough to surprise the first user, but it is immature for an enterprise project. If you use an ADG in your project, nightmare will accompany with you forever.