Some of my columns need explicit widths, while others should just fill up all available space.
There is a forceFitColumns option, but it seems to ignore any explicit widths I've set. I want my explicit widths to be respected, and for implicit ones to be estimated sanely.
I guess to get this behavior I'd have to disable the default column width and rewrite autoSizeColumns to not mess up my explicit column widths. I can imagine a convention where you put in '*' for the column width if you'd like it to be auto-sized instead of using the default. Has anyone made a fork that has this kind of feature?
The "*" implicit width notation would be useful indeed.
Meanwhile, you can also set minWidth and maxWidth on your explicitly-sized columns so that they are not resized by forceFitColumns.
来源:https://stackoverflow.com/questions/9880485/make-one-column-fill-remaining-space-in-slickgrid-without-messing-up-explicit-wi