Search code examples
apache-flexadvanceddatagrid

Display number of items in a grouping for Advanced Datagrid


I have my ADG displaying data like this:

1st Floor
  Administration
    John 
    Mary
    Johnson
    Cole
    Roger
    Margo
  Accounting
    Mel
    Liza
    Johann
    Jackson
2nd Floor
  IT
    Blake
    Steve
    Cherry
    Aries
  HR
    Peter
    Paul
    Mary
3rd Floor
  Management
    Henry
    Randy
    Dave
    Darlene

What do I need to modify for each grouping so that the number of items are displayed per each group, i.e.

1st Floor (10)
  Administration (6)
    John 
    Mary
    Johnson
    Cole
    Roger
    Margo
  Accounting (4)
    Mel
    Liza
    Johann
    Jackson
2nd Floor (7)
  IT (4)
    Blake
    Steve
    Cherry
    Aries
  HR (3)
    Peter
    Paul
    Mary
3rd Floor (4)
  Management (4)
    Henry
    Randy
    Dave
    Darlene

Appreciate your inputs.

Thanks.


Solution

  • Write a label function for the column and calculate the count in the labelfunction