Reputation:
Hi i have a problem in my jqgrid when i am clicking the pane the grid size is not resizing .how to resize it ?.
Upvotes: 4
Views: 9214
Reputation: 11
The above answer was good, but this solves both problems. Resizing now and Resizing when the window or IFrame gets resized.
// Size me now...
$("#list1").setGridWidth($(window).width());
// Size me later...
$(window).bind('resize', function () {
$("#list1").setGridWidth($(window).width());
}).trigger('resize');
Happy coding!
Upvotes: 1
Reputation: 13009
Not sure if this is what you mean, but this should keep your grid at 100% width:
$(window).bind('resize', function() {
$("#jqgrid").setGridWidth($(window).width());
}).trigger('resize');
Upvotes: 9