{field:'assertEntity',title:'资产名称',editor:{ type:'validatebox', options:{ required:true } },formatter:function(value,rowData,rowIndex){ return rowData.assertEntity.assertName; },30},
把上面红色部分保持一致后
$('#tt').datagrid('insertRow',{
index:0,row:{
faultId:'0',
assertEntity:'',
faultFindDate:'',
faultFindPeople:'',
faultStatus:'',
faultType:''
}
});
$('#tt').datagrid('selectRow',0);
$('#tt').datagrid('beginEdit',0);
就不会再出错了