free-jqgrid / jqGrid

jQuery grid plugin
https://github.com/free-jqgrid/jqGrid
Other
478 stars 196 forks source link

setGridWidth & minColWidth #506

Open sba-github opened 2 years ago

sba-github commented 2 years ago

Hello everybody!

I resize my grid when its bootstrap container size is changing by using : $(window).bind('resize', function () { let col = theGrid.closest(".row").children().first(); theGrid.jqGrid("setGridWidth", col.width()); }).trigger('resize');

Maybe there is a smarter way, but I'm not a js/css expert. So please feel free to tell me a better way if so ;-)

Some columns are not fixed and should have a min width. I found autoResizing: { minColWidth: 200 } inside colModel, but this does not seem to be respected inside setGridWidth.

What could I do to make this work?

Thx, Sebastian