如果只保证字段为数字,如何保存我的保存按钮,显示消息?
--dontPublishCloudwatch
答案 0 :(得分:0)
您可以使用内置验证。为此,您需要使用编辑规则。您可以在Guriddo jqGrid documentation.
找到更多内容在你的情况下很简单:
{
name: 'horaRegistro', index: 'horaRegistro', width: 0, editable: true, hidden: false,
edittype: 'text',
editoptions: {
size: 15,
maxlengh: 10,
},
editrules : {
number : true
}
},
您还可以设置最小最大值和其他限制。