Ag grid both custom and default header renderers Angular

829 Views Asked by At

Is it possible to use default and custom header renderer based on some boolean flag? Didn't find solution here https://www.ag-grid.com/javascript-grid-header-rendering/ In their example you can use custom header, but you can not switch between them. use case - bulk buttons in header instead of column names when you select a row

1

There are 1 best solutions below

3
Maulik On

You can pass params to header component and show and hide icon base on params value.

headerComponentParams : {
        showIcon: true/false/somefunction // show icon in headerComponent base on this param value
    }