Page 1 of 1

Power grid - missing columns

PostPosted: Thu Jun 03, 2021 6:32 pm
by pitc
Power grid is missing a couple of the columns I have defined in the toolpanel in the side nav.
Not sure why - unless it is a bug in ag-grid.
I have 16 columns defined in the designer but only 14 show in the tool panel. I have seven columns that are showing in the grid.
One of the missing (A) has the colDef hide=true (visible property = true) and the other (B) does not have colDef set (visible property = true).
A is not shown on the grid as expected.
B is shown on the grid as expected.
So it is only in the tool panel that ag-grid is confused. Not a good UX.
Has anyone else found this quirk?
My speculation is that there might be a magic number of 16 columns displayable in the tool panel for some unknown reason?

Re: Power grid - missing columns

PostPosted: Mon Jun 07, 2021 8:56 am
by paronne
Hi, where do you see the colDef hide=true ?
Do you save & restore the column state for the Grid ? Perhaps the visibility of the columns goes wrong due to the restore; as if has been restored a column state from a previous version of the grid (when it had 14 columns instead of 16).
Something else to look at the is the id assigned to the columns. If you have set (optional) id for the columns, you should make sure the id is unique for each column in grid. I can imagine the grid may get confused if multiple columns have the same id.
Also, for the columns not showing the in the toolPanel, have a look if the column's property enableToolPanel is set to true.
If nothing helps, you may include a test solution where the issue can be reproduced, so we can look into the issue.

Regards,
Paolo

Re: Power grid - missing columns

PostPosted: Tue Jun 08, 2021 6:44 pm
by pitc
Paolo,
thanks for the hints about the tool panel. It was not enabled. I thought I looked at all those settings three times.
I am setting the colDef myself to hide=true.
I do not save nor restore the state of the columns programmatically.
I am not sure about the visible property - does it mimic the coldDef of hide=true.
No docs explain anything like that.
So I just assumed that I have to use the ag-grid web site where the column definitions are explained.