这是序列化后的JSON数据
[
{
"ID": 2,
"Dept": {
"DepartID": 1,
"DepartParentID": "1 ",
"DepartName": "系统",
"DepartDesc": "系统",
"DepartType": "内部 ",
"DepartTelephony": "0284651245",
"DepartStatus": "正常 "
},
"LoginName": "admin",
"Password": "123",
"Sex": 0,
"Email": "admin@sian.com",
"QQ": "2365486",
"Telephony": "02864548952",
"Position": "经理",
"Mobile": "13598642536",
"Address": "成都",
"RealName": "admin",
"Status": "正常",
"CreateTime": "2012-12-27T00:00:00",
"ModifyTime": "2012-12-27T00:00:00",
"Type": "内部"
}
]
DepartID外键
怎么绑定显示外键对象?有什么好的方法或者建议,求指教。。
------解决方案--------------------------------------------------------
http://www.jeasyui.com/tutorial/datagrid/datagrid22.php
------解决方案--------------------------------------------------------
那给列加上一个formatter就好了,easyui太烂,最近转战ext了
{field:'Dept.DepartName',title:'DepartName'
formatter: function(value,row,index){
return row[Dept]['DepartName'];
}
}
------解决方案--------------------------------------------------------
上面少了引号
return row['Dept']['DepartName'];