为了账号安全,请及时绑定邮箱和手机立即绑定

求指教,一个mvc4 和easyui的问题

求指教,一个mvc4 和easyui的问题

慕慕森 2018-12-06 22:22:10
我在布局页面里引入了样式和js @Styles.Render("~/EasyUI/themes/default/easyui.css") @Styles.Render("~/EasyUI/themes/icon.css") @Scripts.Render("~/EasyUI/jquery-1.7.2.min.js") @Scripts.Render("~/EasyUI/jquery.easyui.min.js") @Scripts.Render("~/EasyUI/locale/easyui-lang-zh_CN.js") 控制器里面的方法是: // // GET: /Admins/ public JsonResult Index() {     List list = db.adminList.ToList();     var date = new { total = list.Count, rows = (list) };     return Json(date, JsonRequestBehavior.AllowGet); } 返回给页面的json数据是: {"total":5,"rows":[{"ID":2,"Account":"aaa","PWD":"111","Name":null,"Tel":null,"Email":null,"Introduce":null,"Rank":null,"Rights":null,"Created":"\/Date(1373817600000)\/","Enabled":0,"ChannelStr":null,"ColumnStr":null},{"ID":3,"Account":"bbb","PWD":"222","Name":null,"Tel":null,"Email":null,"Introduce":null,"Rank":null,"Rights":null,"Created":"\/Date(1373817600000)\/","Enabled":0,"ChannelStr":null,"ColumnStr":null},{"ID":4,"Account":"ccc","PWD":"333","Name":null,"Tel":null,"Email":null,"Introduce":null,"Rank":null,"Rights":null,"Created":"\/Date(1373817600000)\/","Enabled":0,"ChannelStr":null,"ColumnStr":null},{"ID":5,"Account":"ddd","PWD":"444","Name":null,"Tel":null,"Email":null,"Introduce":null,"Rank":null,"Rights":null,"Created":"\/Date(1373817600000)\/","Enabled":0,"ChannelStr":null,"ColumnStr":null},{"ID":6,"Account":"eee","PWD":"555","Name":null,"Tel":null,"Email":null,"Introduce":null,"Rank":null,"Rights":null,"Created":"\/Date(1373817600000)\/","Enabled":0,"ChannelStr":null,"ColumnStr":null}]}在视图中的用easyui绑定这些数据,居然绑定不出来。 $(function () {   $('#list').datagrid({     url: 'Admins/Index',//控制器/方法     columns: [[       { field: 'Account', title: '帐号', width: 100 },       { field: 'PWD', title: '密码', width: 100 },       { field: 'Created', title: '创建时间', width: 100, align: 'right' }     ]]   }); }); 绑定失败了,看到的页面是,上面那一堆json数据,为什么会这样呢?
查看完整描述

4 回答

?
紫衣仙女

TA贡献1839条经验 获得超15个赞

貌似没啥问题额,换个jquery版本呢?
查看完整回答
反对 回复 2018-12-09
?
慕侠2389804

TA贡献1719条经验 获得超6个赞

columns获取列有问题 
查看完整回答
反对 回复 2018-12-09
?
收到一只叮咚

TA贡献1821条经验 获得超4个赞

什么问题?愿闻其详
查看完整回答
反对 回复 2018-12-09
  • 4 回答
  • 0 关注
  • 374 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信