easyui解析后台传回的json报错

前台JS:

 $('#table').datagrid({
        fit:true,
        fitColumns:true,
        pagination:true,
        pagination:true,
        pageList:[5,15,30,50],
        pageSize:15,
        title:'实验室列表',
        iconCls:'icon-search',
        url:'getAllLabInfo',
        remoteSort:true,
        striped:true,
        fitColumns:true,
        rownumbers:true,
        remoteSort:false,
        toolbar:'#tb',
        columns:[
        {
            title:'编号',
            field:'id',
            width:60,
            sortable:true,
            align:'center',
            halign:'center',
        },
        {
            title:'实验室名称',
            field:'labName',
            width:60,
            sortable:true,
            align:'center',
            halign:'center',
        },
        {
            title:'所属学院',
            field:'academy',
            sortable:true,
            width:100,
            align:'center',
            halign:'center',
        },
        {
            title:'分类',
            field:'category',
            width:100,
            align:'center',
            halign:'center',
        },
        {
            title:'创建日期',
            field:'createTime',
            align:'center',
            halign:'center',
            width:100,
            sortable:true,

        },
        {
            title:'创建人',
            field:'createrName',
            width:100,
            align:'center',
            halign:'center',
        },
        {
            title:'操作',
            field:'opt',
            width:100,
            align:'center',
            halign:'center',
            formatter: function(value,row,index){
                return "<a href='#'>编辑</a>";
            }
        }],
        onDblClickRow:function(){
            $('#table').datagrid('uncheckAll');
        }
    });

后台JSON返回值:(没有回车)
{"total":3,"rows":[{"createTime":"2016-05-12 17:01:30.000000","labName":"物理实验室","id":1,"category":"物
理类","academy":"理学院","createrName":"sysadmin"},{"createTime":"2016-05-12 17:01:37.000000","labName":"
化学实验室","id":2,"category":"化学类","academy":"理学院","createrName":"sysadmin"},{"createTime":"2016-05-12 17
:01:40.000000","labName":"金工实习","id":3,"category":"车床打磨","academy":"主校区","createrName":"sysadmin"}]}

报错:
图片说明

搞了一晚上了,以前做过类似的,返回的json都是一个格式,这回咋就不行了呢

2个回答

 columns定义
 columns:[[
    {field:'itemid',title:'Item ID',rowspan:2,width:80,sortable:true},
    {field:'productid',title:'Product ID',rowspan:2,width:80,sortable:true},
    {title:'Item Details',colspan:4}
]]
nickzhou99
nickzhou99 我的个天。全怪自己手贱了
大约 4 年之前 回复

下午本来用的是jquery dataTable的,弄了一下午也是绑定不到数据。网上大大小小的教程都看了个遍,还是没改通。最后改换以前做过的easyui,结果也出现了奇怪的问题

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐