1 Reply Latest reply on Oct 10, 2008 12:34 AM by atta707

    Need help with ItemRenderer.

    masita18
      Assume that we have two itemRenderer. Inside each itemRenderer we have an image(img), a name(varName) and a HSlider(HS). Assume first itemRenderer has a varName called "a" and second itemRenderer had a varName called "b". Assume that 1st itemRenderer has a relationship with the 2nd itemRenderer, if the first itemRendeder is clicked and user has change it's HSlider(HS) value. Will it be possible to programatically obtain the second itemRenderer based on its varName("b") and change "b" HSlider(HS) value without having to click on the 2nd itemRenderer?

      CODE: ItemRenderer
      <mx:HBox width="100%" horizontalGap="0">
      <mx:Canvas width="45" height="45">
      <mx:Image id="img" width="100%" height="100%" source="{ _data.imgPath }" />
      </mx:Canvas>

      <mx:VBox width="100%" height="100%" horizontalAlign="left" id="textBox">
      <mx:Label id="varName" text="{_data.varName}" textAlign="left" fontWeight="bold" height="16"/>
      </mx:VBox>
      </mx:HBox>

      <mx:VBox width="100%" height="100%" horizontalAlign="center" id="sliderBox" >
      <mx:HSlider id="HS" minimum="0" maximum="100" value="{(_data.iniVal/_data.maxVal)*100}" />
      </mx:VBox>
        • 1. Re: Need help with ItemRenderer.
          atta707 Level 2
          where are you this renderer? In a grid or some kind of list?

          is renderer set to editor by using rendererIsEditor property?

          Are you saying that the value of slider when changed to one 'cell' should update all the other cells with the same value?

          Do the parent component have itemEditBegin event; it should! If so, then itemEditEnd maybe the event you're looking for.

          Can you post a fully working, minimum application?

          ATTA