读书人

jqGrid 添加、修改时如何自定义验证和

发布时间: 2013-09-28 10:01:20 作者: rapoo

jqGrid 添加、修改时怎么自定义验证和提示
jqGrid 添加、修改时如何自定义验证和提示
如图
⒈红框内提示怎么改
⒉如何自定义验证方式(图中 密码 只能输入数字 只要设置number:true)
jqGrid 添加、修改时如何自定义验证和提示 jquery jqGrid php
[解决办法]

引用:
Quote: 引用:

wiki摘抄的,我没验证过,如果你没有试过的话,可以试一试

colModel: [
...
{name:'price', ..., editrules:{custom:true, custom_func:mypricecheck....}, editable:true },
...
]


function mypricecheck(value, colname) {
if (value < 0
[解决办法]
value >20)
return [false,"Please enter value between 0 and 20"];
else
return [true,""];
}

custom_func:mypricecheck.... 这“点点点”是什么 还能这么调用的额?

...只是省略的意思,因为editrules里面还可以设置其他的属性,反正如果你要自定义验证的话下面的格式时必须的:editrules:{custom:true, custom_func:mypricecheck}

读书人网 >JavaScript

热点推荐