ag-grid : show dropdown on cell of grid with angular

Viewed 17589

I am working with angular 8 andI am able to render the ag-grid, but I also need to show the dropdown on cell, so i added the code like below :

that's a ts file code with single column.

this.columns[0] = {
  headerName: 'a', field: 'a', cellEditorParams: {
    cellEditor: 'agRichSelectCellEditor',
    values: ['a','b','c'],

  },
};
this.defaultColDef = {
  flex: 1,
  minWidth: 80,
  editable: true,
  resizable: true,
};

for html file, I have code as below :

<ag-grid-angular style="width: 100%; height: 500px;" class="ag-theme-alpine"
            [rowData]="rows" [columnDefs]="columns" (gridReady)="onGridReady($event)" [defaultColDef]="defaultColDef">

here the rows is empty, I want to show the dropdown with a,b,c as value whether the column is empty or filled with some value.

do we need to buy the enterprise edition of ag-grid to use agRichSelectCellEditor

following this tutorial

1 Answers

agRichSelectCellEditor is Available in ag-Grid Enterprise only. An alternative to using the browser's select popup for dropdowns inside the grid.

You can create your own custom editor for showing dropdown in the cell. Follow the link - https://www.ag-grid.com/javascript-grid-cell-editor/

Related