- 注册时间
- 2017-8-23
- 最后登录
- 1970-1-1
- 阅读权限
- 10
- 积分
- 427
- 精华
- 0
- 帖子
- 0
 
|
felt 发表于 2018-6-21 10:15 
你这处理逻辑我有点看懂,为何在commitedit事件中updateRow?还是个空数据?
请提供一个简单的html来重现你 ...
<div id="datagrid" class="mini-datagrid" allowCellEdit="true" allowCellSelect="true" onlyCheckSelection="true" editNextOnEnterKey="true" editNextRowCell="true" oncellcommitedit="OnCellCommitEdit">
<div property="columns">
<div header="发布状态" headerAlign="center">
<div property="columns">
<div field="zxnb" name="zxnb" width="65px">中心内部</div>
<div field="scl" name="scl" width="55px">市残联</div>
<div field="xxzx" name="xxzx" width="65px">信息中心</div>
</div>
</div>
<div field="fbyxjsrq" name="fbyxjsrq" dateFormat="yyyy-MM-dd HH:mm:ss" headerAlign="center" width="150px">发布有效结束日期
<input ondrawdate="" class="mini-datepicker" property="editor" width="103"
format="yyyy-MM-dd HH:mm:ss" timeFormat="HH:mm:ss" showTime="true" showOkButton="false"
showClearButton="false" allowInput="false"/>
</div>
</div>
</div>
</div>
<script type="text/javascript">
mini.parse();
var grid = mini.get("datagrid");
function updateDataResource() {
enableItems("1");
grid.setAllowCellEdit(true);
}
function OnCellCommitEdit(e) {
var grid = e.sender;
var record = e.record;
var field = e.field, value = e.value;
grid.updateRow(record,{});
changeCheckboxState('2')
}
function changeCheckboxState(lx){
if(lx=='1'){//禁用
$("input[type=checkbox]").each(function(){
$(this).attr("disabled",true);
});
}else if(lx=='2'){//启用
$("input[type=checkbox]").each(function(){
$(this).attr("disabled",false);
});
}
}
</script>
|
|