I’m Using Ag-Grid Enterprise in a .NET Project. I want to hide a column if user changes the visibility filter of that column. Its hide/show.
Currently I’m Doing this :
kpiData.forEach(function (kpi) {
var column = gridOptions.api.getColumn(kpi.name);
if (!kpi.Visible) {
// Hide the column
column.setActualWidth(0);
gridOptions.api.setColumnVisible(kpi.name, false);
}
})
The issue is its hiding the column from grid, but it’s still visible a bit, and it’s draggable, so user can just drag it and make it visible on grid. I want to completely hide it.
There is a hidden column between NS and CXL
Can we use suppressColumnsToolPanel=true
as a method, so i can change it when the condition met??
All the solutions that i found, are suggesting to use setColumnVisible, which i’m currently using, but its not working as expected.
M Usman Sharjeel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1