2 Replies Latest reply on Jan 16, 2009 9:52 AM by flexstone

    AdavancedDataGrid dynamic itemRenderer

    flexstone Level 1
      I need to change the properties of a button used as an itemrenderer in AdvancedDataGrid - previously I used a method for DataGrid that worked nicely but I cannot seem to get my modified code to work with ADG.

      Seems to center around being able to identify the listData for the IR. It keeps coming up null. Utlimately I need to get listData.owner in order to get the isSelectedItem(data) property for the IR. Any ideas ???
        • 1. Re: AdavancedDataGrid dynamic itemRenderer
          Level 7

          "flexstone" <webforumsuser@macromedia.com> wrote in message
          news:gkpsq4$b4o$1@forums.macromedia.com...
          >I need to change the properties of a button used as an itemrenderer in
          > AdvancedDataGrid - previously I used a method for DataGrid that worked
          > nicely
          > but I cannot seem to get my modified code to work with ADG.
          >
          > Seems to center around being able to identify the listData for the IR. It
          > keeps coming up null. Utlimately I need to get listData.owner in order to
          > get
          > the isSelectedItem(data) property for the IR. Any ideas ???

          Why not just use a styleFunction?

          HTH;

          Amy


          • 2. Re: AdavancedDataGrid dynamic itemRenderer
            flexstone Level 1
            I found the problem was how the itemRenderer was specified - I had been trying to use <mx:AdvancedDataGridRendererProvider> but after struggling for a few hours I changed back to the assigning IR via the itemRenderer property in the ADG.

            This gave me access to the parent ADG from the IR. Ultimately I was after the isSelectedItem(data) property for the IR. - Changing the button properties when the ADG row as the selectedItem.......be glad to hear an easier method if you have one.....