- 注册时间
- 2014-10-25
- 最后登录
- 1970-1-1
- 阅读权限
- 10
- 积分
- 189
- 精华
- 0
- 帖子
- 26
|
dforce 发表于 2014-12-2 10:00
http://www.miniui.com/demo/#src=datagrid/celllinkedit.html
参考示例
第二列的filed和displayField有 ...
<div type="comboboxcolumn" field="SystemCategory" width="100" autoShowPopup="true" headeralign="center" align="center" vtype="required">系统
<input property="editor" class="mini-combobox" style="width:100%;" data="SystemCategory" />
</div>
<div type="comboboxcolumn" field="ModuleCategory" displayField="ModuleCategory" autoShowPopup="true" headeralign="center" width="120" align="center" vtype="required">模块
<input property="editor" class="mini-combobox" style="width:100%;" textField="name" valueField="name" />
</div>
function OnCellBeginEdit(e) {
var grid = e.sender;
if (e.field == "ModuleCategory") {
var system = e.record.SystemCategory;
if (system) {
execute("/Operation/QuestionRecord/GetData", { onComplete: function (data, settings) {
e.editor.setData(data);
}
});
}
else {
e.cancel = true;
}
}
}
我在程序里是这样写的
|
|