2 Replies Latest reply on Jan 18, 2009 4:03 AM by flexstone

    AdvancedDataGrid displays itemRenderer in Group Header ??

    flexstone Level 1
      I may have found a catch22 in trying to implement a Hierarchial display in an ADG. If I use the AdvanceDataGridRenderProvider to define the itemRenderer for the Children records in the ADG then it displays in a nice nested hierarchy.

      However in doing this the itemRenderer has no access to listData in order to perform some dynamic display settings for each child. So using a dropinItemRenderer defined for a column to get the dynamic display causes the itemRenderer to display in every line - including the "heading".

      Seems I can't have the best of both worlds - dropinitemrenderer that does not also display in the group heading ??

      Maybe I should use a Tree control instead ??
        • 1. Re: AdvancedDataGrid displays itemRenderer in Group Header ??
          Level 7

          "flexstone" <webforumsuser@macromedia.com> wrote in message
          news:gksqeh$rpg$1@forums.macromedia.com...
          >I may have found a catch22 in trying to implement a Hierarchial display in
          >an
          > ADG. If I use the AdvanceDataGridRenderProvider to define the itemRenderer
          > for
          > the Children records in the ADG then it displays in a nice nested
          > hierarchy.
          >
          > However in doing this the itemRenderer has no access to listData in order
          > to
          > perform some dynamic display settings for each child. So using a
          > dropinItemRenderer defined for a column to get the dynamic display causes
          > the
          > itemRenderer to display in every line - including the "heading".
          >
          > Seems I can't have the best of both worlds - dropinitemrenderer that does
          > not
          > also display in the group heading ??
          >
          > Maybe I should use a Tree control instead ??

          I've never had this problem. Is there a reason you're not using a
          styleFunction to get the dynamic display settings?


          • 2. Re: AdvancedDataGrid displays itemRenderer in Group Header ??
            flexstone Level 1
            I'm not sure a styleFunction is robust enough in my case. While I am changing styles of several components I'm also doing conditional calls to other functions. - Anyway, I did solve my itemRenderer issue by creating a single itemRenderer for all the columns displayed.

            After further testing it seems that if my itemRenderer was in the first column of the ADG it would play nicely and not show in the "heading" row as well. Once I moved my itemRenderer to the last column then the problem appeared.