7

I upgraded the ag-grid & ag-grid-react to 14.2.0, but I still get this warning:

ag-grid: Looking for component [agGroupCellRenderer] but it wasn't found.

My column definitions:

let columnDefs = [
    {headerName: 'Name', field: 'userName', width:163, cellRenderer:'agGroupCellRenderer'},
    {headerName: 'Job Title', field: 'jobTitle', width:143},
]

What am I missing here?

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
krishna sinha
  • 71
  • 1
  • 1
  • 2

4 Answers4

7

To those who have this message "ag-Grid: Looking for component" with Angular 8, check to see if you have it referenced on your HTML page. In my code, I was missing some reference code in the HTML file. Here is a rough example that could help someone:

EXAMPLE

Component File:

import { AgGroupCellRendererComponent } from 
'../../global/components/agGroupCellRenderer.component';

columnDefs= [{headerName: 'Name', field: 'userName', width:163, 
cellRenderer:'agGroupCellRenderer'}]

frameworkComponents: any;
constructor() {
    this.frameworkComponents = {
      agGroupCellRenderer: AgGroupCellRendererComponent,
    };
}

HTML File:

<ag-grid-angular
  style="width: 100%; height: 500px;"
  class="ag-theme-balham"
  [gridOptions]="gridOptions"
  [rowData]="rowData"
  [frameworkComponents]="frameworkComponents"
> 
Mr. Green
  • 83
  • 1
  • 5
6

I think you should use components property for mapping string(agGroupCellRenderer) to angular component(AgGroupCellRendererComponent)

gridOptions = {
    ... 
    components: {
        agGroupCellRenderer: AgGroupCellRendererComponent
    }
}

More information here https://www.ag-grid.com/javascript-grid-cell-rendering/

CREZi
  • 111
  • 1
  • 6
4

make sure to have in your component file :

 frameworkComponents = {agGroupCellRenderer: AGroupCellRenderer}
 context = { componentParent: this }
.....
{headerName: 'Name', field: 'userName', width:163, cellRenderer:'agGroupCellRenderer'}

and this in your html file :

 <ag-grid-angular 
  ..
    [frameworkComponents]="frameworkComponents"
    [context] = "context"

..>
bena
  • 41
  • 3
0

The warning went away when upgraded to 15.0.0

krishna sinha
  • 71
  • 1
  • 1
  • 2
  • 4
    I'm receiving these errors on aligned grid tables in v17.0.0 despite the cell rendering correctly – lgants Apr 12 '18 at 16:15