I am seeking to replicate a basic version of the sidebar found in Ag-Grid Enterprise. The goal is to use JavaScript to gather all column groups within a grid and then provide a checkbox for each group to toggle visibility.
While I am aware that individual columns can be hidden using
gridApi.setColumnsVisible(['col1','col2'], false)
, as demonstrated in this question, my preference is to hide entire column groups simultaneously. Is there a straightforward method to accomplish this without manually hiding each column?
If the process needs to be done on a per column basis, is there an efficient way to retrieve the columns within a specific column group?