W3Cschool
恭喜您成為首批注冊用戶
獲得88經驗值獎勵
在上一節(jié)內容中,我們學習了如何向jQuery EasyUI數(shù)據(jù)網格(datagrid)添加工具欄(toolbar),本節(jié),我們將繼續(xù)介紹復雜的工具欄應該如何創(chuàng)建。
jQuery EasyUI數(shù)據(jù)網格的工具欄可以包含按鈕及其他組件。您可以通個一個已存在的DIV標簽來簡單地定義工具欄布局,該DIV標簽將成為數(shù)據(jù)網格工具欄的內容。
以下是如何創(chuàng)建數(shù)據(jù)網格組件的復雜工具欄的步驟。
<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ù)網格(datagrid)的工具欄域對話框(dialog)相似。我們不需要寫任何的javascript代碼,就能創(chuàng)建帶有復雜工具欄的數(shù)據(jù)網格(datagrid)。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: