1 Reply Latest reply on Jan 12, 2007 8:09 AM by Pigg_Man

    How to popup a window for editing purposes

    Pigg_Man
      I have a column in a datagrid that I need to edit. In that column I have a linkButton in an item renderer and when the user click s on it I need to popup a window with 5 radio buttons and a date field chooser and ok and cancel buttons. Basically I need to use the popup manager to do this.... When the ok chooses there options and clicks ok the values are submitted back to the calling function. How do you edit the items of the dataprovider from within the item renderer? Am I going about this the wrong way. I've been stuck on this for awhile.. cheers to someone that can help :)
        • 1. Re: How to popup a window for editing purposes
          Pigg_Man Level 1
          I found this answer and it worked:
          Make your cellrenderer implement the following
          implements="mx.controls.listClasses.IDropInListItemRenderer"

          import mx.controls.listClasses.BaseListData;

          public function get listData () : BaseListData {
          return _listData;
          }

          public function set listData (value:BaseListData) : void {
          _listData = value;
          }

          once you do this you have access to the listData property within your cellrenderer
          .... With the listData property you can access stuff like owner and such

          code used to update control after you modify it

          var myListData:DataGridListData = DataGridListData(this.listData);
          this.data.label = "new String";
          DataGrid(myListData.owner).dataProvider.itemUpdated(this.data);