Closed vyasnikul closed 4 years ago
beforeMount () { this.columnDefs = [ {headerName: 'Actions', field: 'action', cellRendererFramework: 'GridEditButton', cellRendererFramework: 'GridDeleteButton'}, {headerName: 'SrNo', field: 'srno'}, {headerName: 'KeyValue', field: 'keyvalue'}, {headerName: 'ObjectID', field: '_id'} ]; this.rowData = [ {action: '', srno: 0, keyvalue: 'Toyota', _id: 'Celica'}, {action: '', srno: 1, keyvalue: 'Honda', _id: 'Civic'}, {action: '', srno: 2, keyvalue: 'Chevy', _id: 'Impala'} ]; },
A sample before mount function with two components in the first column. But it will give error of duplicate cellRendererFramework.
You cannot have two cellRenderers in a column - if you want this sort of thing I'd suggest creating a composite renderer that encompasses other components and just render the parent component
beforeMount () { this.columnDefs = [ {headerName: 'Actions', field: 'action', cellRendererFramework: 'GridEditButton', cellRendererFramework: 'GridDeleteButton'}, {headerName: 'SrNo', field: 'srno'}, {headerName: 'KeyValue', field: 'keyvalue'}, {headerName: 'ObjectID', field: '_id'} ]; this.rowData = [ {action: '', srno: 0, keyvalue: 'Toyota', _id: 'Celica'}, {action: '', srno: 1, keyvalue: 'Honda', _id: 'Civic'}, {action: '', srno: 2, keyvalue: 'Chevy', _id: 'Impala'} ]; },
A sample before mount function with two components in the first column. But it will give error of duplicate cellRendererFramework.