3 Replies Latest reply on Nov 8, 2007 9:13 PM by Sreenivas R

    Advanced Data Grid

      am trying to use the heirarchal functionality of advanced datagrid - have a had great success until now - i have a list of 38 items that are not all grouped the same - so for one item it may be grouped 5 levels down in the heiracrcy, while with other it may be only levels down -hwoever even when I leave those groups blank in the grouping collection, the items all go to lowest posslbe level - can anyone help - thanks
        • 1. Re: Advanced Data Grid
          Sreenivas R Adobe Employee
          Are you expecting the grouping to take place to different depths based on what is available and what is not available in different fields of data? It is a strange requirement.

          We don't have any logic to deal with data items which have few properties missing. The logic expects all properties specified for grouping to be present.

          The data being provided as input seems to be little peculiar. We need to understand the use case little more deeper before we can address the issue. Is it possible for you to provide sample data or sample app?

          If you can show the output you are expecting as a image that would be great.

          I currently have a work-around in mind but would like to test it with sample data before I can put forth the idea.

          • 2. Re: Advanced Data Grid
            WPOTOOLE Level 1
            thanks - the best way to describe the way I expect to see the data would be as follows

            North America
            Canada 123,456
            California 56,789
            New York 12,867

            in this case the state level (california and new york) would not apply to Canada while it does for the US - currently I pass my data off to the grouping code with a continent, country and state - for the Canada records I leave the state blank but it populates the data at the state level in an empty box

            • 3. Re: Advanced Data Grid
              Sreenivas R Adobe Employee
              By using a derived class of GroupingColection and overriding the getChildren function as follows you can get close to the desired behavior.

              public class CustomGroupingCollection extends GroupingCollection

              override public function getChildren(node:Object):Object
              var result:Object = super.getChildren(node);

              if(result && result.length == 1)
              if (result[0][grouping.label] == "Not Available"
              || result[0][grouping.label] == "")
              result = getChildren(result[0]);

              return result;

              Some more checks and tweaking may be required.