1 Reply Latest reply on Aug 17, 2006 11:51 PM by Matlus

    how to retrieve data from parent to popup window?

    mounte
      Hi
      I am trying to selected ID from a dataGrid to the popup window. how do i do that?


      public function selectItem(): void
      {
      var initObj:String;
      var detail :Object = mx.managers.PopUpManager.createPopUp(this, detailWin, true, initObj);
      }
        • 1. Re: how to retrieve data from parent to popup window?
          Matlus Level 1
          If I understand you correctly, you want to pass the selected id (or something) to a popup window, correct? If so:

          In your detailWin class, you can define a property of the correct type (if id is an int then define a property of type int.). This property should be "public" and writeable. So let's call this property "selectedId" for discussion sake.

          Once you have a reference to you popup window:
          var detail :Object = mx.managers.PopUpManager.createPopUp(this, detailWin, true, initObj);

          simply set the property in that instance:
          detailWin.selectedId = [the id from your grid';