0
votes

I am using aggrid in my appluication, I am trying to interact using parent child component with 'cellRendererFramework', howevver here we can only specify component name but not event bindings.

below is the block of code from my parent component and I am trying to communicate with 'MdSelectComponent', tried below commented options(template, cellRenderer).

Could you please suggest how to add bindings to 'MdSelectComponent'

private createColumnDefs() {
    return [
      {
        headerName: 'Name',
        field: 'name',
        ///cellRenderer:"group",
        cellRendererParams: {
          suppressCount: true,
          color: 'guinnessBlack'
        },
        //template:"<MdSelectComponent></MdSelectComponent>",
        cellRendererFramework: MdSelectComponent,

        /*cellRenderer: function(params) {
          return '<span>'+ params.value+'</span><a href="https://www.google.com" target="_blank">test</a>'
        },*/
        width: 225
      },

I got the below github issue link but looks like still proper working example is missing.. https://github.com/ag-grid/ag-grid-angular/issues/78

1

1 Answers

0
votes

You need to add frameworkComponents property to your gridOptions

        frameworkComponents:{
            'MdSelectComponentStringName':MdSelectComponent
        }

It's up to you would it be described as internal function (so components binding) or isolated component (frameworkComponents) and then you can use: cellEditor = 'MdSelectComponentStringName' or cellRenderer and so on.

Check details on doc