title: How can raise events for the buttons created dynamically in ag-grid cell-rendered?
body: <p>Hie I am using ag-grid angular2 where i am trying to place a button in every row which i am successful.when i click on that button i adding an event listener to the button so that when this button is clicked i want to raise an event.
  This is how i am adding buttons to every row</p>
  
  <pre><code>    {headerName: "Gold", field: "gold", width: 100,  cellRenderer: this.ageCellRendererFunc },
  </code></pre>
  
  <p>Here i am writing the addeventlistener logic for the button</p>
  
  <pre><code>ageCellRendererFunc(params) {
      var eSpan = document.createElement('button');
      console.log(params);
      eSpan.innerHTML = 'Del';
      eSpan.addEventListener('click', function () {
          this.raiseevent();
      });
      return eSpan;
  }
  </code></pre>
  
  <p>This is the event which i want to raise when the button is clicked</p>
  
  <pre><code>raiseevent(){
  alert('code worked');
  }
  </code></pre>
  
  <p>But it is showing an error saying raiseevent is not defined...How can i correct this mistake...How can i give the reference of an event inside addeventListener...Somebody please help me</p>