W3Cschool
恭喜您成為首批注冊(cè)用戶(hù)
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
在上一節(jié)內(nèi)容中,我們學(xué)習(xí)了如何向jQuery EasyUI數(shù)據(jù)網(wǎng)格(datagrid)添加工具欄(toolbar),本節(jié),我們將繼續(xù)介紹復(fù)雜的工具欄應(yīng)該如何創(chuàng)建。
jQuery EasyUI數(shù)據(jù)網(wǎng)格的工具欄可以包含按鈕及其他組件。您可以通個(gè)一個(gè)已存在的DIV標(biāo)簽來(lái)簡(jiǎn)單地定義工具欄布局,該DIV標(biāo)簽將成為數(shù)據(jù)網(wǎng)格工具欄的內(nèi)容。
以下是如何創(chuàng)建數(shù)據(jù)網(wǎng)格組件的復(fù)雜工具欄的步驟。
<div id="tb" style="padding:5px;height:auto">
<div style="margin-bottom:5px">
<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true"></a>
<a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true"></a>
<a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true"></a>
<a href="#" class="easyui-linkbutton" iconCls="icon-cut" plain="true"></a>
<a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true"></a>
</div>
<div>
Date From: <input class="easyui-datebox" style="width:80px">
To: <input class="easyui-datebox" style="width:80px">
Language:
<input class="easyui-combobox" style="width:100px" url="data/combobox_data.json" valueField="id" textField="text">
<a href="#" class="easyui-linkbutton" iconCls="icon-search">Search</a>
</div>
</div>
<table class="easyui-datagrid" style="width:600px;height:250px" url="data/datagrid_data.json"
title="DataGrid - Complex Toolbar" toolbar="#tb" singleSelect="true" fitColumns="true">
<thead>
<tr>
<th field="itemid" width="60">Item ID</th>
<th field="productid" width="80">Product ID</th>
<th field="listprice" align="right" width="70">List Price</th>
<th field="unitcost" align="right" width="70">Unit Cost</th>
<th field="attr1" width="200">Address</th>
<th field="status" width="50">Status</th>
</tr>
</thead>
</table>
正如您所看到的,數(shù)據(jù)網(wǎng)格(datagrid)的工具欄域?qū)υ捒颍╠ialog)相似。我們不需要寫(xiě)任何的javascript代碼,就能創(chuàng)建帶有復(fù)雜工具欄的數(shù)據(jù)網(wǎng)格(datagrid)。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: