jQGrid设置列宽 [英] jQGrid set column width

查看:502
本文介绍了jQGrid设置列宽的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了设置jQGrid宽度的方法:

I found the way how to set jQGrid width:

$('#Grid1').setGridWidth(705, true);

当我通过true时,它将根据此宽度调整所有列的大小.很好,但问题是:Is it possible to keep constant width at least one column of grid when i call setGridWidth() or is it possible to change width only one column of the grid?

It is resizing all columns according with this width when i am passing true. That is fine but the question is: Is it possible to keep constant width at least one column of grid when i call setGridWidth() or is it possible to change width only one column of the grid?

在grid的源代码中有一个函数setColWidth = function () { },但是我不确定如何调用该函数以及如何在其中传递宽度,它并不能接受任何参数.

In source code of grid there is a function setColWidth = function () { } but i not sure how to call this one and how to pass width as a prarm there, it is not accepting any params by the way.

需要帮助.

推荐答案

您可以尝试使用 fixed colModel选项可保持其中一列的宽度恒定.

You can try using the fixed colModel option to keep the width of one of the columns constant.

这篇关于jQGrid设置列宽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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