I'm using AgGrid v28 with Angular 14. I've a very simple requirement. On click of details values I have to call a method.
My code:
columnDefs = [
{...},
{
headerName: 'Details',
field: 'partDescription',
filter: false,
minWidth: 50,
cellRendererParams: {
onClick: this.showPartsHierarchcy.bind(this),
label: 'partDescription',
icon: '',
},
},
]
showPartsHierarchcy() {
...
}
The details column is populated but on click my method showPartsHierarchcy
is not called. Please correct my mistake.
I tried:
This answer.
cellRenderer: function(params: any) {
return '<a (click)="showPartsHierarchcy">'+ params.value+'</a>'
}
No luck. Please help me.