博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
jqgrid 使用自带的行编辑
阅读量:7186 次
发布时间:2019-06-29

本文共 1919 字,大约阅读时间需要 6 分钟。

上篇

本篇,说说使用jqgrid自带的行编辑

1)设置需要编辑的列  editable: true 

colModel: [            { label: '字段编码', name: 'FieldCode', key: true, width: 180, editable: false },             {                 label: '字段名称',                 name: 'FieldName',                 width: 150,                 editable: true,                 edittype: "text",                 editrules: { required: true }             },              {                  label: '字段类型',                  name: 'DataType',                  width: 10,                  hidden: true,                  editable: true,              },              {                  label: '是否排序',                  name: 'IsOrder',                  width: 80,                  editable: true,                  edittype: "select",                  editoptions: {                      //value: "true:是;false:否"                      value: "true:true;false:false"                  }              },               {                   label: '列宽',                   name: 'Width',                   width: 55,                   editable: true,                   editrules: { required: true, integer: true },                   edittype: "text"               }]
View Code

2)设置底部按钮按钮区

$('#fieldGrid').navGrid("#fieldGridPager", { edit: false, add: false, del: false, refresh: false, view: false });    $('#fieldGrid').inlineNav('#fieldGridPager',                // the buttons to appear on the toolbar of the grid                {                    edit: true,                    add: false,                    del: true,                    cancel: true,                    editParams: {                        keys: true,                    },                    addParams: {                        keys: true                    }    });
View Code

 注意:使用自带的编辑不需要设置行选中属性 onSelectRow

需要特别注意:不能同时支持内置行编辑行事件触发的行编辑。会产生行结束编辑的干扰项,比较坑,请绕开。若要使用行编辑请分别采用以下某一种方式

转载于:https://www.cnblogs.com/senyier/p/7364322.html

你可能感兴趣的文章
Unity3D占用内存太大的解决方法
查看>>
BootStrap框架及其他框架布局技术
查看>>
LOJ #2183「SDOI2015」序列统计
查看>>
k8s常用命令
查看>>
树的子结构
查看>>
FCKeditor中的回车换行和制表符缩进
查看>>
筛选出sql 查询结果中 不包含某个字符
查看>>
vi编辑器使用
查看>>
马踏棋盘
查看>>
Spring Maven 安装环境配置
查看>>
上下文切换查看 & sar
查看>>
queue-reconstruction-by-height
查看>>
android 得到连接热点的ip的方法
查看>>
Redis 安装 与 使用
查看>>
分块算法(简洁易懂)
查看>>
P3372 【模板】线段树 1
查看>>
怎样才是一个基本水平的java程序员?
查看>>
磁盘阵列
查看>>
托管 ,com
查看>>
Spring Boot MongoDB 查询操作 (BasicQuery ,BSON)
查看>>