angularag-grid-angular

Can't bind to 'frameworkComponents' since it isn't a known property of 'ag-grid-angular'


i am getting below error in adGridModule

        <ag-grid-angular style="width: 100%; height: 500px; margin-top: 10px;" class="ag-theme-alpine"
            [rowData]="rowData" [columnDefs]="columnDefs" [defaultColDef]="defaultColDef" [rowHeight]="30"
            [headerHeight]="30" [frameworkComponents]="frameworkComponents">
        </ag-grid-angular>

where i have imported the component in .ts file constructor

  this.frameworkComponents = {
  buttonRenderer: GridButtonRendererComponentComponent,
}

what's mistake i did here, i have imported all required modules

note. i am new learner in angular please help me in simple language.


Solution

  • I assume that you were using a lower version of ag-grid and have now upgraded to v30.2.0. The frameworkComponents was replaced with components in version 30.0.0. So just replace [frameworkComponents] with [components] and you should be good.

    Change Log for ag-grid version 30.0.0 - https://www.ag-grid.com/changelog/?fixVersion=30.0.0

    You can also look at the Registering Custom Components here - https://www.ag-grid.com/angular-data-grid/components/ - refer section 'By Name'.