1 Reply Latest reply on Feb 19, 2009 12:03 PM by RonRebennack

    Dynamic column & itemRenderer event question

    RonRebennack
      Hi all!

      I am creating columns in a DataGrid dynamically and using a custom UIComponent as the itemRenderer. I have created a custom event called "ClickDetail", which is dispatched via a button in my itemRenderer class. The event isn't being handled.
      I know in MXML you have to use outerDocument. To boil it down what is the ActionScript equivalent to this MXML:

      <mx:columns>
      <mx:DataGridColumn ... >
      <mx:itemRenderer>
      <mx:Component>
      <InfoColumn ClickDetail="outerDocument.Info_Click(event)" />
      </mx:Component>
      </mx:itemRenderer>
      </mx:DataGridColumn>
      </mx:columns>

      My AS:

      var DGC_Info:DataGridColumn;

      DGC_Info = new DataGridColumn("Info");
      DGC_Info.dataField = "Info";
      DGC_Info.headerText = "Info";
      DGC_Info.itemRenderer = new ClassFactory(InfoColumn);


      Thanks!