EasyUI datagrid在insertRow时如果有formatter会出现EasyUI TypeError: rowData.assertEntity is undefined

{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);

 就不会再出错了

你可能感兴趣的:(undefined)