jQuery MiniUI
标题:
mini-datagrid怎么设置某个列不能为空?
[打印本页]
作者:
lsx991380592
时间:
2017-3-17 22:04:13
标题:
mini-datagrid怎么设置某个列不能为空?
<div id="datagrid_fw" class="mini-datagrid"
style="width: 100%; height: 380px;" idField="CID"
showPager="false" allowCellEdit="true"
oncellbeginedit="on_fw_cellbeginedit(e,'datagrid_fw')"
allowCellSelect="true" multiSelect="true"
editNextOnEnterKey="true" allowHeaderWrap="true"
allowCellValid="true">
<div property="columns">
<div type="indexcolumn"></div>
<div type="checkcolumn"></div>
<div name="CID" field="CID" visible="false"></div>
<div type="comboboxcolumn" field="FILLMEDIUM_TYPE" vtype="required" width="110">
充装介质类别
<input property="editor" class="mini-combobox" style="width: 100%;" valueField="id" textField="text"
url="../../js/common/submit.jsp?method=getCommonDict&FIELD_NAME_q=FILLMEDIUM_TYPE&CLASS_in=2300" />
</div>
<div field="FILLMEDIUM_NAME" vtype="required;maxLength:45" width="100">
充装介质名称
<input property="editor" class="mini-textbox" style="width: 100%;" />
</div>
<div field="FILL_ADDR" vtype="required;maxLength:300" width="200" >
充装地址
<input property="editor" name="FILL_ADDRS" class="mini-textarea" required="true" tooltip="充装地址不能为空"
style="width: 100%; height: 120px;" />
</div>
</div>
</div>
上面我是想让充装地址设置为必填项,在点击保存的时候没值就不能保存。另外用什么方法可以判断datagrid表单里面是否有数据?
作者:
dforce
时间:
2017-3-20 11:38:19
http://www.miniui.com/demo/#src=datagrid/cellvalidation.html
参考一下表格验证的示例。
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2