Changing column width dinamycally on hide.

I have a small grid with some columns. When left-clicking on one of the columns, it dissapears, and all the columns on the right moves to the left, ocuppying the vacant column place. I’m looking for a way to, after hiding any given column, make the rightmost column on the table to fill the gap between it and the right margin for its container:


I’m using the onColumnHidden event to capture when it’s happening the hiding event. I’m initializing the columns with grid.setInitWidthsP(“n1,n2,n3,*”); so, for starting, the last column do fills the space as I want. My problem comes if I delete the last column, as it seems that I can’t use setinitWidthsP (or the non-P version) to reset the column withouth having to call init (and this is also that does nothing).

I can read where and wich is the last visible column, I can create the string with the widths, but I can’t glue all together for the grid to resize that last element. Am I missing something here?

Thanks in advance!

Unfortunately the required feature is not supported.
You may try to set the widths to all your columns to “":

Yeah, that was my first (well, maybe second or third) option, but the client wanted a specific size for each column and setting all widths to “*” distributes evenly each column.

Thanks for the answer, anyway, at least I can close this issue.