Hello,
I have a table with month names as columns and each month I would like to show and hide specific columns dynamically without manually changing the application each month. For e.g, if it is February now, I want to hide the column named 'January' and show the column 'February' till 'December'. When March starts, the JS function should hide February and show from March column onwards.
Right now I am doing something like this in 'Attributes -> JS Initialisation Code':
const d = new Date();
let month = d.getMonth();
if (month === 1) {
gridView.view$.grid("hideColumn", "JANUARY");}
else {
gridView.view$.grid("showColumn", "FEBRUARY");}
However, this is not working at all. Any sort of help will be appreciated.