- 注册时间
- 2017-4-2
- 最后登录
- 1970-1-1
- 阅读权限
- 10
- 积分
- 295
- 精华
- 0
- 帖子
- 68
 
|
dforce 发表于 2017-4-25 15:47 
监听combobox的onvaluechanged事件
第一列结束编辑后,
function onValueChanged(e){ - <div displayField="goodno" width="70" headerAlign="center">
- 货号<input property="editor" class="mini-combobox" url="getallgood" allowInput="true"
- style="width: 100%;" textField="goodno" id="goodno"
- valueField="goodid" multiselect="false" onvaluechanged="onHPChanged" />
- </div>
- <div displayField="goodname" width="90" headerAlign="center">
- 货品名称<input property="editor" class="mini-text" id="goodname" style="width: 100%;"/>
- </div>
- <div type="textcolumn" field="goodunit" width="35" headerAlign="center">
- 单位<input property="editor" class="mini-text" id="goodunit" style="width: 100%;" allowInput="false"/>
- </div>
复制代码- function onHPChanged(e){
- var id = e.value;
- var grid = mini.get("datagrid1");
- $.ajax({
- url : "getgoodatt?gid="+id,
- success : function(text) {
- var jt = mini.decode(text);
- console.log(jt);
- var editor=e.editor;
-
- var row=grid.getEditorOwnerRow(editor);
- console.log(row);
- setTimeout(function(){
- grid.updateRow(row,{"goodname":"fff","goodunit":"uuu"}) //更新你要填的字段
- },500)
- },
- error : function() {
- }
- });
- }
复制代码 但是依然没有显示。控制台错误消息是:
undefined
TypeError: _ is undefined[详细了解] miniui.js:11:196202
o1O10 http://localhost:8080/costumeSCM/static/scripts/miniui/miniui.js:11:196202
success http://localhost:8080/costumeSCM/jxc/scgl/xzrll:222:17
resolveWith http://localhost:8080/costumeSCM/static/scripts/jquery-1.6.2.min.js:1:8904
D http://localhost:8080/costumeSCM/static/scripts/jquery-1.6.2.min.js:1:74399
$ http://localhost:8080/costumeSCM/static/scripts/jquery-1.6.2.min.js:1:81007
谢谢!
|
|