PowerGrid column resize

Hi,
we got an issue with powerGrid column/grid resizing.
We have a grid with 3 columns (grid B), which one of those is hided on need.
The columns are shown or hided due to another grid (grid A) selection.
The problem is that, when the grid B switch between 2 or 3 columne, the horizontal navigation bar happear in the gird.
This doesn’t happen when you first show the grid with 2 or 3 columns.

When I first select in grid A a row which have 2 columns in grid B the columns are shown normally, with no horizontal navigation bar
[attachment=2]grid_2_columns_first_show.jpg[/attachment]

After I select a row in grid A which have 3 columns in grid B, the grid B show the horizontal navigation bar
[attachment=1]grid_3_columns_after_2_col_click.jpg[/attachment]

Vice versa, if I open a new NG client, and select a row in grid A which have 3 columns in grid B, it show fine, without any horizontal navigation bar
[attachment=0]grid_3_columns_first_show.jpg[/attachment]

And then if I select in grid A a row which have 2 columns in grid B, the horizontal navigation bar happear.
(couldn’t add another screenshot due to limit of 3 fils attachments)

Searching on the web I found that the AG-Grid API has a function which resize the columns: “api.sizeColumnsToFit()”
You can check at https://www.ag-grid.com/javascript-data … ng-example

Now, I can’t find a way to use the api to call the function to resize the columns: there is another way to resize the columns to the gird width after the third column has been shown/hided?

Thanks