title: ag-grid cell renderer that shows data from multiple columns
body: <p>I'm trying to create a cell renderer that will take data from other columns.</p>
  
  <p>For example, each row signifies some piece of data, and users should be able to open it depending on their permissions, and a restricted piece of data should be rendered differently than a non-restricted element. Other columns will have an affect on rendering this one column as well.</p>
  
  <p>I would expect to be able to access the other columns' data using the path <code>this.params.node.data.restricted</code>, and this works during a click event, but I can't seem to have access to this data during the rendering phase of the component.</p>
  
  <pre class="lang-js prettyprint-override"><code>"columnDefs": [
      {
        "field": "id",
        "width": 40,
        "checkboxSelection": true
      },
      {
        "headerName": "Title",
        "field": "docTitle",
        "width": 1580,
        "cellRenderer": "detailViewRenderer"
      }
    ]
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>import {Component} from "@angular/core";
  import {ICellRendererAngularComp} from "ag-grid-angular";
  
  @Component({
    selector: 'detail-view-renderer',
    styles: [``],
    template: `
      &lt;a class="restricted" *ngIf="params.node.data.restricted"&gt;{{params.value}}&lt;/a&gt;
      &lt;a class="not-restricted" *ngIf="!params.node.data.restricted"&gt;{{params.value}}&lt;/a&gt;
    `
  })
  export class DetailViewRendererComponent implements ICellRendererAngularComp {
    public params: any;
  
    agInit(params: any): void {
      this.params = params;
    }
  
    constructor() {}
  
    refresh(): boolean {
      return false;
    }
  }
  </code></pre>
  
  <p>I think ideally, what I'd like to do is set the columns that will be passed into my renderer and access them in the component somehow as parameters. Is that possible or do we have some other workaround? I see <a href="https://www.ag-grid.com/javascript-grid-full-width-rows/" rel="nofollow noreferrer">Full Width Rows</a> as an option, but that renders the entire row as one column.</p>