aijuans 发表于 2013-1-29 08:39:09

easyUI datagrid显示摘要信息在页脚

@author YHC
在这个教程中,我们将告诉你如何显示摘要信息行在datagrid页脚.
http://my.csdn.net/uploads/201208/11/1344653098_9632.png

查看 Demo

显示页脚行,你应该设置showFooter 属性为true,然后准备页脚行定义在datagrid的数据,以下是示例数据.

{"total":1,"rows":[{"id":1,"name":"Chai","price":18.00}],"footer":[{"name":"Total","price":18.00}]}   

创建DataGrid

<table id="tt" title="DataGrid" class="easyui-datagrid" style="width:400px;height:250px"          url="data/datagrid17_data.json"          fitColumns="true" rownumbers="true" showFooter="true">      <thead>          <tr>            <th field="name" width="80">Product Name</th>            <th field="price" width="40" align="right">Unit Price</th>          </tr>      </thead></table>页脚行和显示数据行一样,所以你可以显示不止一个摘要信息在页脚.

下载 EasyUI 示例:

<div style="font-size: 14px; font-family: Arial,Helvetica,'Nimbus Sans L',sans-serif; text-align: left; padding-left: 50px;">   easyui-datagrid-demo.zip
页: [1]
查看完整版本: easyUI datagrid显示摘要信息在页脚