这是Controller代码:
public ActionResult MainWest() { var entity = new SysMenuShow() { SysMenuId = 1, SysMenuName = "系统管理", _ParentId = null, SystemId = 1, PermissionTypes = "1", IconUrl = "~/res/icon/cog.png", NavigateUrl = "", IsHasChild = true, IsEnabled = true, IsView = true, DataPermissionFlag = true, OrderNo = 1, Remark = "" }; var sys = new List<SysMenuShow>(); sys.Add(entity); var json = Json(ToJson(sys)); return json; }
这是请求时获取的Json:
[{"SysMenuId":1,"SysMenuName":"系统管理","ParentId":null,"PermissionTypes":"1","IconUrl":"~/res/icon/cog.png","NavigateUrl":"","IsHasChild":true,"IsEnabled":true,"OrderNo":1,"Remark":"","SystemId":1,"IsView":true,"DataPermissionFlag":true,"Permissions":[],"SysMenus":[],"ParentMenu":null}]
这是页面绑定代码:
<table title="Folder Browser" class="easyui-treegrid" data-options=" url: '/Home/MainWest', method: 'get', rownumbers: true, idField: 'SysMenuId', treeField: 'SysMenuName' "> <thead> <tr> <th field="SysMenuName" data-options="field:'SysMenuName'" width="220">SysMenuName</th> </tr> </thead> </table>
页面就是不显示内容,求大神们指导下这是为什么