基于大小的列标题和列值的JQGRID自动宽度 [英] JQGRID autowidth of column header and column value based on size

查看:130
本文介绍了基于大小的列标题和列值的JQGRID自动宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是JQGRID的新手.我有一个网格.我希望列宽应等于列标题网格的最大值,以较大者为准.

I am new to JQGRID. I have a grid. I want the column width should be equal to the maximum value of the grid of the column heading whichever is bigger.

推荐答案

尚不清楚您的意思以及所使用的jqGrid的哪个版本/分支. 免费jqGrid 是我开发的叉子.它包含在列标题之间双击或通过加载直接自动调整列大小的功能.请参阅 Wiki文章其他信息.

It's not full clear what you mean and which version/fork of jqGrid you use. Free jqGrid is the fork which I develop. It contains the feature for automatic resizing of columns on double-click between the column headers or direct by loading. See the wiki article for additional information.

如果我正确理解了您的问题,则应该添加cmTemplate: { autoResizable: true }选项以在每一列中设置autoResizable: true属性,并添加autoresizeOnLoad: true选项jqGrid以在加载数据后自动调整所有列的大小.

If I correctly understand your problem then you should add cmTemplate: { autoResizable: true } option to set autoResizable: true property in every column and to add autoresizeOnLoad: true option jqGrid to automatically resize all columns after loading the data.

这篇关于基于大小的列标题和列值的JQGRID自动宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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