jqGrid获取到python返回的Json数据,未能显示到页面上,为毛???
写道
[{"invdate": "2007-10-01", "id": "1", "name": "test"}, {"invdate": "2007-09-01", "id": "9", "name": "test3"
}]
}]
jQuery(document).ready(function(){
jQuery("#toolbar").jqGrid({ url:'/getJgGridDatas/', datatype: "json", height: 255, width: 980, colNames:['id','invdate', 'name'], colModel:[ {name:'id',index:'id', width:65, sorttype:'int'}, {name:'invdate',index:'invdate', width:50}, {name:'name',index:'name', width:100} ], rowNum:50, rowTotal: 2000, rowList : [20,30,50], loadonce:true, mtype: "GET", rownumbers: true, rownumWidth: 40, gridview: true, pager: '#ptoolbar', sortname: 'item_id', viewrecords: true, sortorder: "asc", caption: "我的查询" }); jQuery("#toolbar").jqGrid('navGrid','#ptoolbar',{del:false,add:false,edit:false,search:true}); jQuery("#toolbar").jqGrid('filterToolbar',{stringResult: true,searchOnEnter : false}); })