Hi
Following situation: We have a “aggrid-groupingtable” on a form and we start the form for the first time (no changes on column width, position or visibility). I call “getColumnState()” on this grid and the result is “NULL”. If I change the witdh of a column by 1px or change the position or visibility of one or more columns and call “getColumnState()” again, then I get a JSON-String with all the informations.
Is this a bug or a feature? And if a “feature”: why?
My excpectation would be, that “getColumnState()” always deliver the current state of the grid even if it is in the “initial” (design time) state.
Background: On the form are some options that the user can choose from. Depending on the options he choose, some columns should be visible or not. First we’ve tried to iterate over the columns and set the attribute “visible” to true or false. But in some situations the grid will be reset to the initial (desgin time) state after that. But when we iterate over the JSON that we get from the “getColumnState” function and replace the “hide” property with true or false and then call “restoreColumnState” the current state of the other columns stay as the user defined it. But this “workaround” doesn’t work, if we don’t get a result from “getColumnState”.
Best
Roland
Tested with Servoy 2020.12.1 / Servoy NG Grids 2.7.0