This bug even exists in the DHTMLX example on the website.
See: Autowidth for colum(s)
Trying to resize the column whose init width has been set to ‘*’ does not work. If you try to size the column after it, it actually shrinks the column instead of widening it and vice-versa.
In the example on the website, the second column is broken because of the code below. Changing the initWidth to not use a ‘*’ results in correct resizing behavior.
Are there any known workarounds for this bug? Can this get fixed for the next release of DHTMLXGrid?
Unfortunately this is the expected behavior.
“Book Title” column will take all available space after resizing other columns. “Book Title” cannot be resized manually, as it take all available space.
Seems like a poor design that is inconsistent with every other grid control I’ve ever used.
The benefit in the ‘’ is for initialization so that manual column sizing calculations aren’t mandatory for the developer. Since it’s an “initialization width” setting, it doesn’t make sense to constantly re-apply the width at every resize event after. If you don’t want to change the behavior, then can there at least be a way to revert to the normal column resizing behavior after the grid has been initialized with a '’ initWidth?
Another easy option to meet normal expected behavior is for all columns to the right of the ‘*’ column to use the left vertical line instead of the right vertical line of the column to set the column size. The point of reference for resizing the column feels backwards.
You may set the widths of your columns in percentages of the container width using the setInitWidthsP() method:
docs.dhtmlx.com/doku.php?id=dhtm … nitwidthsp
Thank you for your recommendations. They will be considered.
SetInitWidthP doesn’t help. For example, if one column is for checkboxes, it’s a known width. I never want it any larger or smaller. Setting it to a percentage width will never accomplish this.
In the end, the useful feature here is to be able to define certain columns to a desired width (such as checkbox columns) and others to use a remainder width. However, the resize behavior of the GUI after this point is very unintuitive.
If it looks like a bug, acts like a bug, then it probably is a bug