easyui 加载本地json 文件的方法

easyui 加载本地json 文件的方法

这是我工作中遇到的问题总结,拿出来跟大家分享一下:easyui 加载本地json 文件的方法,(还存在一个问题就是没办法分页,有解决方法的话欢迎下方评论,我们共同进步)

<table id="tt" width="100%" class="easyui-datagrid" style="height:300px"></table>
  • 1
$('#tt').datagrid({
            title:'业务描述',
            iconCls:'icon-save',
            method:'get',//这个是最重要的,不写这个table加载不出来 pagination:true, url:'datagrid_data1.json', height: 300, nowrap:true, fitColumns: true, onLoadSuccess:function(data){ $(this).datagrid('doCellTip',{'max-width':'300px','delay':300}); }, columns:[[ {field:'itemid',title:'申请人',width:200,align:'center'}, {field:'productid',title:'业务唯一编号',width:200,align:'center'}, {field:'listprice',title:'业务受理部门',width:200,align:'center'}, {field:'unitcost',title:'申请人',width:200,align:'center'}, {field:'attr1',title:'业务唯一编号',width:200,align:'center'}, {field:'status',title:'业务受理部门',width:200,align:'center'} ]] })

猜你喜欢

转载自www.cnblogs.com/bwdblogs/p/11112736.html