I have a dashboard with several jqgrids. My dashboard windows can individually expand to fill up the page while all other windows disa开发者_StackOverflowpear. There is also a toggle to shrink back
If i have a jqgrid, in that window, when it expands I would like the grid width to expand and shrink a as well.
Is there some way to bind the grid to its parent div so it can expand and shrink?
Sample so far which does not work.
$('.portlet-content').bind('resize', function() {
jQuery("#gridConfirm").setGridWidth($('.portlet-content').width()-5, true);
}).trigger('resize');
You should bind jQuery.resize to the window
object. Try this one
$(window).resize(function() {
$("#gridConfirm").jqGrid('setGridWidth', $('.portlet-content').width()-5, true);
}).trigger('resize');
精彩评论