3 Replies Latest reply on Sep 24, 2012 6:03 AM by jfb00

    Accessing datagrid data

    Jerry62712 Level 1

      I have an item renderer that is a linkbutton.  It is in an advancedatagrid of a few columns.  When it is clicked, a procedure is fired up and that procedure needs to know the values of the datasource for that row.  How do I communicate that?

       

      Here is the renderer:

       

      override public function set data(value:Object):void

      {

      removeAllChildren();

       

            if (value == null ||

      value == "")

            {

      return;

            }

       

            super.data = value;

       

            var lb2:LinkButton = new LinkButton();

       

            lb2.label = value.individualName +

      ": " + value.rspVer;

       

      lb2.addEventListener(MouseEvent.CLICK, retrieveList);

      addChild(lb2);

      }

       

      public function retrieveList(event:Event):void

      {

            var retrieve:UserAARetrieveVO = new UserAARetrieveVO();

      retrieve.type = Const.USER_AA_RETRIEVE;

      retrieve.indvID = // selected row of datasource id;

      retrieve.parmStartDate =      // selected row of datasource start;

            retrieve.parmEndDate =        // selected row of datasource end;

       

            (new UserAARetrieveEvent(retrieve)).dispatch();

      }