views:

2254

answers:

2

I am using an AdvancedDataGrid with two GroupingFields. The dataProvider has a list of objects with these two field values, but occasionally the second field value can be null. When it loads, the AdvancedDataGrid UI has a root folder (first GroupingField) and some additional subfolders (second GroupingField). This is all good. However, the objects with a null value for the second GroupingField, just get placed in a subfolder with no label.

I want the objects with a null second GroupingField value to appear as leaf nodes beneath the root folder (first GroupingField) minus the blank subfolder.

A good way to picture this would be a file explorer. Is there a good way to do this? Make the folder icon disappear maybe after expanding this node through actionscript?

ParentFolder
   SubFolder
      Leaf Object
      Leaf Object
   SubFolder
      Leaf Object
   Leaf Object
   Leaf Object
A: 

You may want to consider passing hierarchical data into your ADG rather than using a GroupingCollection on flat data. With hierarchical data, nodes with children will be represented as folders, nodes without children will show as leafs (just like a Tree control behaves).

Just like this: http://www.flex-blog.com/tree-in-advanced-datagrid-example/

Jeremy Mitchell
A: 

that is not an example for the question that was asked.

Paul Chavaux