如何修复动态固定的jqgrid高度 [英] how to fix jqgrid height fixed dynamically

查看:172
本文介绍了如何修复动态固定的jqgrid高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以像这样使用struts2标签设置jqgrid的高度



< sjg:grid
.
.
.
.
height ="500px"
.
.
.
>



我需要通过计算窗口大小来动态设置高度.我尝试过这样

var height = window.innerHeight;
$(#gridId").jqGrid("setGridHeight",height);



问题是,当网格内的数据数量发生变化时,高度也会发生变化,我们不能像struts2标签那样固定高度吗?...通过动态传递数据

we can set jqgrid height using struts2 tag like this



< sjg:grid
.
.
.
.
height="500px"
.
.
.
>



I need to set the height dynamically by calculating the window size.I tried like this

var height=window.innerHeight;
$("#gridId").jqGrid("setGridHeight",height);



The problem is that when the number of data changes inside the grid the height is also varying, can''t we fix the height as struts2 tag does?...by passing data dynamically

推荐答案

("#gridId").jqGrid("setGridHeight",height);



问题在于,当网格内的数据数量发生变化时,高度也会变化,我们不能像struts2标签那样固定高度吗?...通过动态传递数据
("#gridId").jqGrid("setGridHeight",height);



The problem is that when the number of data changes inside the grid the height is also varying, can''t we fix the height as struts2 tag does?...by passing data dynamically


请参考: http://www.trirand.net/demoaspnet.aspx [

这篇关于如何修复动态固定的jqgrid高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆