EasyUI datagrid在insertRow时如果有formatter会出现EasyUI TypeError: rowData.assertEntity is undefined
Posted on 2013-05-03 09:13 凌风孤鸿 阅读(1007) 评论(0) 编辑 收藏 举报{field:'assertEntity',title:'资产名称',editor:{ type:'validatebox', options:{ required:true } },formatter:function(value,rowData,rowIndex){ return rowData.assertEntity.assertName; },width:30},
把上面红色部分保持一致后
$('#tt').datagrid('insertRow',{
index:0,row:{
faultId:'0',
assertEntity:'',
faultFindDate:'',
faultFindPeople:'',
faultStatus:'',
faultType:''
}
});
$('#tt').datagrid('selectRow',0);
$('#tt').datagrid('beginEdit',0);
就不会再出错了
未经许可禁止转载本博客内容