jQuery';s Flexigrid在标题中显示/隐藏列功能
这是我的Flexigrid:jQuery';s Flexigrid在标题中显示/隐藏列功能,jquery,flexigrid,Jquery,Flexigrid,这是我的Flexigrid: $("#grUser").flexigrid({ url: 'someJSON.php' , dataType: 'json' , colModel : [ {display: '', name : 'Index', width :100, align: 'left'} , {display: '', name : 'Value', width : 100, align: 'left'} ]
$("#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
});
标题中的show/hide columns(显示/隐藏列)功能确实是一个很酷的选项,但是我想指定哪一列可用,而且我很难找到一个关于我在指定colModel时的选项的好文档。这里
{display: '', name : 'Index', width :100, align: 'left'}
我们还可以在列的定义中添加什么
此外-Flexigrid的文档来源是什么?不幸的是,没有这方面的文档,因此非常令人沮丧。你必须看看源代码,看看你能做些什么 只需添加“hide:true”,如下所示。将hide设置为true将隐藏列
{display: 'Row ID', name : 'id', width : 100, sortable : true, align: 'left', hide: true}
可以设置以下属性:
-显示
(这是用于列标题的内容)
(这是用于Ajax调用的数据库字段名)name
宽度
高度
:真/假可排序
:左/中/右对齐
:真/假隐藏
:真/假(仅在打开搜索栏时适用)searchable