Search code examples
angularag-gridag-grid-angular

Ag-Grid - Cell Dropdown Checkboxes


I need to create an ag-grid with multiple rows, but in one cell in that row it must be a dropdown that have options with the possibility to choose one or more values through checkboxes.

An example of what i pretend in a cell.

<div class="dropdown" data-control="checkbox-dropdown">

Select

Check All Selection One Selection Two Selection Three Selection Four Selection Five

Codepen

This is possible?

Thanks


Solution

  • Yes, it is possible, you can make use of cellRenderer. An Example:

    {
      headerName: 'Dropdown',
      field: 'dropdown',
      cellRenderer: params => {
        
        let div = document.createElement('div');
        // you can create your dropdown here
        return div;
      }
    }