enableResizing doesn't work when setInitWidths is set to "*"

I have a grid with the majority of columns being set to * as I don’t want to pre-define the column width.


For the columns that are a fixed width, I am able to resize the columns manually. For the columns that are “*” I can’t resize them manually.

after the mygrid.init();
I tried getting the columns width and re-setting it by doing (for each column):
var width = mygrid.getColWidth(colIndex);

But this did not help.
any suggestions?

Also, is there a way for the columns to size automatically based on the data? Even when I set the width to “*”, it just takes the size of the grid container and divides it by the number of columns, and they all become the same size. It does not evaluate the data when determining how wide a column should be. Are there any settings that maybe I’m not aware of that can help with this?

Thanks in advance!

If you set the width of the column to “*” this column will take all the available space. This setting cannot be changed after the init of the grid.
You may try to set the width of the column in percentages:
docs.dhtmlx.com/doku.php?id=dhtm … nitwidthsp

To adjust the column width to make the content visible you may try to use the adjustColumnSize() method:
docs.dhtmlx.com/doku.php?id=dhtm … columnsize

Note, that the method should be called after the data is loaded to the grid.