3 Replies Latest reply on Aug 14, 2008 6:41 AM by Newsgroup_User

    AdvancedDataGrid - how to display this type of data

    anoweb
      I have the following two classes (attached to this message).

      I think the AdvancedDataGrid can display it properly. Basically there can be EmployeeGroups inside of EmployeeGroups..nested as much as you want. Each group also contains Employees. I'd like to display these columns:
      Name (of group) | Name (of employee) | Dept (of employee)

      any help to get started would be great.
        • 1. Re: AdvancedDataGrid - how to display this type of data
          anoweb Level 1
          anyone??

          I'd like the display to be like:

          Name | Department
          ----------------------------------------
          Group 1
          Jim IT Developer
          Tom IT Developer
          Group 1.1
          Todd IT Sales
          Rick IT Sales
          Group 1.1.1
          Bryan IT Contractor
          Group 2
          Bill Admin
          John Admin
          • 2. Re: AdvancedDataGrid - how to display this type of data
            anoweb Level 1
            so to get things to show up as I wanted I had to add a "children" property to my EmployeeGroup (didn't see that anywhere in the documentation, but I noticed the Adobe examples have "children" properties).

            Obviously it can be more efficient, but it works..which is the start!
            • 3. Re: AdvancedDataGrid - how to display this type of data
              Level 7

              "anoweb" <webforumsuser@macromedia.com> wrote in message
              news:g81cc8$avp$1@forums.macromedia.com...
              > so to get things to show up as I wanted I had to add a "children" property
              > to
              > my EmployeeGroup (didn't see that anywhere in the documentation, but I
              > noticed
              > the Adobe examples have "children" properties).
              >
              > Obviously it can be more efficient, but it works..which is the start!
              >
              > public function get children():ArrayCollection {
              > var kids:ArrayCollection = new ArrayCollection();
              > for (var i:int=0; i < groups.length; i++) {
              > kids.addItem(groups );
              > }
              > for (var i:int=0; i < employees.length; i++) {
              > kids.addItem(employees
              );
              > }
              > return kids;
              > }

              Look at HierarchicalData. The children property is pretty clearly defined
              there.

              HTH;

              Amy