国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

輕松學(xué)習(xí)jQuery插件EasyUI EasyUI創(chuàng)建樹形網(wǎng)絡(luò)(1)

2019-11-20 11:07:09
字體:
供稿:網(wǎng)友

一、EasyUI創(chuàng)建基礎(chǔ)樹形網(wǎng)格
樹形網(wǎng)格(TreeGrid)組件從數(shù)據(jù)網(wǎng)格(DataGrid)繼承,但是允許在行之間存在父/子節(jié)點關(guān)系。許多屬性繼承至數(shù)據(jù)網(wǎng)格(DataGrid),可以用在樹形網(wǎng)格(TreeGrid)中。為了使用樹形網(wǎng)格(TreeGrid),用戶必須定義 'treeField' 屬性,指明哪個字段作為樹節(jié)點。
本文將向您展示如何使用樹形網(wǎng)格(TreeGrid)組件設(shè)置一個文件夾瀏覽。

創(chuàng)建樹形網(wǎng)格(TreeGrid)

<table id="test" title="Folder Browser" class="easyui-treegrid" style="width:400px;height:300px" url="data/treegrid_data.json" rownumbers="true" idField="id" treeField="name"> <thead> <tr> <th field="name" width="160">Name</th> <th field="size" width="60" align="right">Size</th> <th field="date" width="100">Modified Date</th> </tr> </thead></table>

二、EasyUI創(chuàng)建復(fù)雜樹形網(wǎng)格
樹形網(wǎng)格(TreeGrid)可以展示有限空間上帶有多列和復(fù)雜數(shù)據(jù)電子表格。本教程將演示如何將表格數(shù)據(jù)排列在分割的網(wǎng)格和多行表頭中,以便組織共同的數(shù)據(jù)。

創(chuàng)建樹形網(wǎng)格(TreeGrid)

<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)格(Treegrid)的使用和數(shù)據(jù)網(wǎng)格(Datagrid)一樣。請使用 'frozen' 屬性來定義凍結(jié)列,列的 'colspan' 和 'rowspan' 屬性來定義多行表頭。

以上就是分別為大家分享的EasyUI創(chuàng)建簡單樹形網(wǎng)絡(luò)和復(fù)雜樹形網(wǎng)絡(luò)的方法,希望對大家的學(xué)習(xí)有所幫助。

想要學(xué)習(xí)更多內(nèi)容請查看這篇文章:  《輕松學(xué)習(xí)jQuery插件EasyUI EasyUI實現(xiàn)樹形網(wǎng)絡(luò)基本操作(2)》

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 比如县| 新田县| 湄潭县| 莱州市| 铜梁县| 潮州市| 来安县| 如皋市| 博野县| 阳高县| 普兰店市| 伊宁市| 崇文区| 桦南县| 金坛市| 安吉县| 正安县| 偏关县| 安岳县| 霍山县| 营口市| 德庆县| 板桥市| 临泉县| 福建省| 永顺县| 金乡县| 金昌市| 台北县| 资阳市| 宜宾县| 洪泽县| 本溪| 轮台县| 毕节市| 苍梧县| 册亨县| 忻城县| 黑水县| 连州市| 昌吉市|