onBeginEdit: function(index,row){
var dg = $(this);
var editors = dg.edatagrid('getEditors',index);
for(var i=0; i<editors.length; i++){
$(editors[i].target).numberbox('textbox').bind('keydown',function(e){
if (e.keyCode == 13){
dg.edatagrid('endEdit', index);
if (index<dg.edatagrid('getRows').length-1){
dg.edatagrid('selectRow', index+1).edatagrid('beginEdit', index+1);
}
}
})
}
if (editors.length){
$(editors[0].target).numberbox('textbox').focus();
}
}
官方api文档地址:
http://www.jeasyui.com/forum/index.php?topic=6287.0
本文介绍了一个使用EasyUI框架的数据表格编辑功能实现方法,通过监听开始编辑事件来为指定列设置数字输入框,并实现了回车键导航到下一行的功能。
1万+

被折叠的 条评论
为什么被折叠?



