本文写的是最简单的 按照API文档来写的分页。就是插件自带的分页效果。

一、html代码:field就是代表你后台数据的对应的列名。

 1  <table id="dg" class="easyui-datagrid" style="width: 100%; height: 400px;" data-options="nowrap:false">
 2                 <thead>
 3                     <tr>
 4                         <th data-options="field:'DeviceId',checkbox:true"></th>       
 5                         <th data-options="field:'DeviceName', width:120,align:'center'" >名称</th>                       
 6                         <th data-options="field:'DeviceUnitName', width:80,align:'center'">单位</th>
 7                         <th data-options="field:'MakePlace', width:120,align:'center'">产地</th>
 8                         <th data-options="field:'BuyTime', width:120,align:'center'">购置日期</th>
 9 
10                     </tr>
11                 </thead>              
12             </table>
View Code

相关文章: