jQuery EasyUI 數(shù)據(jù)網(wǎng)格 – 創(chuàng)建頁(yè)腳摘要

2022-06-08 16:21 更新

jQuery EasyUI 數(shù)據(jù)網(wǎng)格 - 創(chuàng)建頁(yè)腳摘要

在本節(jié)的示例中,我們將向您展示如何在jQuery EasyUI數(shù)據(jù)網(wǎng)格(datagrid)中創(chuàng)建頁(yè)腳摘要,以顯示摘要信息行。

為了顯示頁(yè)腳行,您應(yīng)該將showFooter屬性設(shè)置為true,然后準(zhǔn)備定義在數(shù)據(jù)網(wǎng)格數(shù)據(jù)中的頁(yè)腳行。以下是示例數(shù)據(jù):

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

創(chuàng)建數(shù)據(jù)網(wǎng)格(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>

頁(yè)腳行和顯示數(shù)據(jù)行一樣,所以您可以在頁(yè)腳顯示不止一個(gè)摘要信息。

下載 jQuery EasyUI 實(shí)例

jeasyui-datagrid-datagrid17.zip

以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)