在运行时调整JQGrid列的大小 [英] Resize the JQGrid column at runtime

查看:87
本文介绍了在运行时调整JQGrid列的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在运行时调整JQGrid列的大小.

I need to resize the JQGrid column at runtime.

例如:列在加载时的列宽为100px.之后我需要将其更改为200.

For eg: the column width for the column was 100px when it is loaded. I need to change it to 200 afterwards.

请帮助.

推荐答案

不幸的是,无法使用jqGrid API做到这一点.从文档:

Unfortunately there is no way to do this using the jqGrid API. From the documentation:

如上所述,可以使用getColProp和setColProp方法获取或设置colModel中的选项.以下是在构建网格时无法动态更改的选项(如果更改,它们将无效或会导致网格错误).对于其中一些选项,有一些方法可以更改值:

As mentioned above the options in colModel can be get or set using the methods getColProp and setColProp. Below are options which can not be changed dynamically when the grid is constructed (If changed they do not have effect or will cause the grid errors). For some of these options there are methods available to change the value:

  • 名称
  • 宽度
  • 可调整大小
  • 标签(方法可用)
  • name
  • width
  • resizable
  • label (method avail.)

这篇关于在运行时调整JQGrid列的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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