1
votes

I am new to Ag grid for angular 2. I wanted to know that how i can populate a dropdown in a cell and on selecting a value. how i can know what value was selected. Please help, plunker would be great help.

1
any luck with that ? - ER.SHASHI TIWARI
yes, I already did that - Deepender Sharma
and? Will should share the knowledge? - JeanAlesi
@JeanAlesi this can be achieved by a cell renderer and whenever any value selected. You can pass a context to the component. For more information you can check for cell renderer as a component - Deepender Sharma

1 Answers

0
votes

You can use cellRenderer like below:

  {
    headerName: 'ABC',
    field: 'ABC,
    width: 135,
    cellRendererFramework: CellDropdown,
    cellRendererParams: {
      pass the CellDropdown Props here
    }
  }

In the CellDropdown custom component, you will get setValue as a prop from ag-grid. Using which you can set the entered value in the table cell