这是我的Flexigrid:
$("#grUser").flexigrid({
url: 'someJSON.php'
, dataType: 'json'
, colModel :
[
{display: '', name : 'Index', width :100, align: 'left'}
, {display: '', name : 'Value', width : 100, align: 'left'}
]
, title: 'Details'
, width: 350
, height: 200
, singleSelect: true
});
Run Code Online (Sandbox Code Playgroud)
标题中的show/hide columns功能是非常酷的选项,但是我想指定哪个列可用,并且我无法找到有关指定colModel的选项的良好文档.这里
{display: '', name : 'Index', width :100, align: 'left'}
Run Code Online (Sandbox Code Playgroud)
我们还可以在列的定义中添加什么?
另外 - 您的Flexigrid文档源是什么?
Gav*_*ods 20
不幸的是,这方面的文档并不存在,因此非常令人沮丧.您必须查看源代码并了解您可以执行的操作.
只需添加'hide:true',如下所示.将hide设置为true将隐藏列.
{display: 'Row ID', name : 'id', width : 100, sortable : true, align: 'left', hide: true}
Run Code Online (Sandbox Code Playgroud)
您可以设置以下属性: - display(这是用于列标题的内容)
name (这是用于Ajax调用的数据库字段名称)
width
height
sortable: 真假
align:左/中/右
hide: 真假
searchable:true/false(仅在您打开搜索栏时适用)
| 归档时间: |
|
| 查看次数: |
11206 次 |
| 最近记录: |