W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
本節(jié),你將學(xué)習(xí)如何創(chuàng)建一個復(fù)雜的jQuery EasyUI樹形網(wǎng)格(TreeGrid)。
樹形網(wǎng)格可以展示有限空間上帶有多列和復(fù)雜數(shù)據(jù)電子表格。下述的示例將演示如何將表格數(shù)據(jù)排列在分割的網(wǎng)格和多行表頭中,以便組織共同的數(shù)據(jù)。
<table title="Complex TreeGrid" class="easyui-treegrid" style="width:550px;height:250px" url="data/treegrid2_data.json" rownumbers="true" showFooter="true" idField="id" treeField="region">
<thead frozen="true">
<tr>
<th field="region" width="150">Region</th>
</tr>
</thead>
<thead>
<tr>
<th colspan="4">2009</th>
<th colspan="4">2010</th>
</tr>
<tr>
<th field="f1" width="50" align="right">1st qrt.</th>
<th field="f2" width="50" align="right">2st qrt.</th>
<th field="f3" width="50" align="right">3st qrt.</th>
<th field="f4" width="50" align="right">4st qrt.</th>
<th field="f5" width="50" align="right">1st qrt.</th>
<th field="f6" width="50" align="right">2st qrt.</th>
<th field="f7" width="50" align="right">3st qrt.</th>
<th field="f8" width="50" align="right">4st qrt.</th>
</tr>
</thead>
</table>
正如您所看到的,樹形網(wǎng)格的使用和數(shù)據(jù)網(wǎng)格(Datagrid)一樣。請使用'frozen'屬性來定義凍結(jié)列,列的'colspan'和'rowspan'屬性來定義多行表頭。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: