首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在jqGrid中编辑或添加时隐藏列并显示字段

在jqGrid中编辑或添加时隐藏列并显示字段
EN

Stack Overflow用户
提问于 2013-08-24 06:41:02
回答 1查看 5.5K关注 0票数 4

我在jqGrid有更多的大肠杆菌。因此需要隐藏jqGrod中的某些列(字段)。当我们编辑或添加需要显示jqgrid中的所有字段时,请编辑弹出或添加弹出窗口。所以这里有什么财产吗。

代码:

代码语言:javascript
复制
    $("#Datasourcegrid").jqGrid({
              postData: { CAId: function () { return $('#hdnchnAppId').val(); } },
                colNames: ['DataSourceId', 'Title','Sort Order'],
                colModel: [
                            { name: 'DataSourceId', index: 'DataSourceId', align: 'left', key: true, editable: false, hidden: true, search:false,width: '10'},
                            { name: 'DataSourceTitle', index: 'DataSourceTitle', sortable: true, align: 'left', width: '400',editable: true, edittype: 'text', editrules: { required: true },stype:'text', search:true,searchoptions:{sopt:['eq']}},
                            { name: 'SortOrder', index: 'SortOrder', sortable: true, align: 'left', width: '100',editable: true, hidden: true, edittype: 'text', editrules:{number:true, required:true}, search:false},

 ],
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-08-24 08:15:19

您可以将edithidden:true添加到hidden: true列的editrules中,查看编辑规则部分的jqgrid以获得更多选项。

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18415769

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档