2 Replies Latest reply on Feb 13, 2012 6:52 AM by poortip87

    How can we display images with checkboxes in an AdvancedDatagrid in hierarchical view?

    poortip87 Level 1

      Hi All!

       

      I am developing a Flex UI to work on Photoshop CS5. I am working on Adobe Flash Builder 4.5. I need to display some images with checkboxes in hierarchical manner. I searched the internet and decided to use the AdvancedDatagrid. I found many examples for checkboxes depicting the use of textual data as dataprovider. I found samples for images too, but that had nothing to do with grouped data. I need something like this:

       

      CheckBox
      ImageCol1
      ImageCol2
      Check1Group1
      Check2Group2
      Check3Group3
      Check4Group4

       

      As you can see in the above table, there are grouped collections in ImageCol1, which are displayed as images, when each group is expanded,  ImageCol1 and ImageCol2 also get populated with image data. I have managed to display images in this manner. The part I am having difficulty is to display checkboxes for each group item as well as each child item in hierarchical manner. I tried using groupItemRenderer property of ADG. But then I am having problems with itemRenderers used for ImageCol1 and ImageCol2.

       

      Please guide me. I need urgent help.

       

      Thanks!

        • 1. Re: How can we display images with checkboxes in an AdvancedDatagrid in hierarchical view?
          poortip87 Level 1

          Hi..!!

           

          As you can see in the above explanation, I am displaying text with the checkboxes in this AdvancedDatagrid hierarchical view. Instead of the text, I need to display images. To display Checkboxes, I am used the itemRender property of ADG. I found that the checkboxes get created for the child nodes, but not for the parent nodes. I debugged and found that the item renderer for checkbox is getting called whenever I open a parent node, i.e., the checkboxes are getting rendered for the children. But, never for the parent nodes. I tried debugging with no hierarchical data, I found that the item renderer gets called for the data that were parent nodes. I concluded that, this problem occurs only when there is an hierarchical data provider for the AdvancedDatagrid. I searched the internet and found that this problem could be overcome by using groupItemRenderer property. But using this would not allow me to use an itemRender for other columns.

           

          Is it even possible to do what I am trying? Am I missing something, or is it that Flex does not support this? Will I have to wait for the next release from Adobe to fix this? Please reply so that I know where to head.

           

          Thanks!

          • 2. Re: How can we display images with checkboxes in an AdvancedDatagrid in hierarchical view?
            poortip87 Level 1

            Is it even possible to do what I am trying? Am I missing something, or is it that Flex does not support this? Will I have to wait for the next release from Adobe to fix this? Please reply so that I know where to head.