分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
效果如图:
首先在需要可编辑的列上添加一个editor属性,列定义为numberbox编辑类型
<th field="SCORES" editor="{type:'numberbox',options:{precision:0}}" width="120">默认分值 </th>
当用户点击一行的时候,我们开始一个编辑动作
$('#dg').datagrid({ onClickCell: function(index,field,value){ $(this).datagrid('beginEdit', index); var ed = $(this).datagrid('getEditor', {index:index,field:field}); } });
作者:itmyhome
给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow
![这里写图片描述](https://i-blog.csdnimg.cn/blog_migrate/2e19ffb3303a490d20ea5d00dd397156.gif)