Make one column fill remaining space in SlickGrid without messing up explicit width columns

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 17:58:37

问题


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?


回答1:


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!