I have jqGrid (free jqGrid) that contains 7 columns. And I applied shrinkToFit: false
, property to enable scrolling for the grid columns (to fit to mobile device).
You can use setColWidth
method (included in free jqGrid) to change the width of the last column dynamically. I don't know which scenario for loading the grid you use. The modification of the demo could be the following: http://jsfiddle.net/OlegKi/andm1299/37/ where
$(window).bind("resize", function () {
var p = $grid.jqGrid("getGridParam"),
cm = p.colModel[p.iColByName.ComboDuration];
$grid.jqGrid("setGridWidth", $grid.closest(".container-fluid").width());
$grid.jqGrid("setColWidth", "ComboDuration", p.width - p.tblwidth + cm.width);
}).triggerHandler("resize");
The above code first resize the width of grid based on the width of the outer container and then adjust the width of the last column based on the difference between the width of the main grid table and the total width of the grid.