輕松學(xué)習(xí)jQuery插件EasyUI EasyUI創(chuàng)建樹(shù)形網(wǎng)絡(luò)(1)
一、EasyUI創(chuàng)建基礎(chǔ)樹(shù)形網(wǎng)格
樹(shù)形網(wǎng)格(TreeGrid)組件從數(shù)據(jù)網(wǎng)格(DataGrid)繼承,但是允許在行之間存在父/子節(jié)點(diǎn)關(guān)系。許多屬性繼承至數(shù)據(jù)網(wǎng)格(DataGrid),可以用在樹(shù)形網(wǎng)格(TreeGrid)中。為了使用樹(shù)形網(wǎng)格(TreeGrid),用戶(hù)必須定義 'treeField' 屬性,指明哪個(gè)字段作為樹(shù)節(jié)點(diǎn)。
本文將向您展示如何使用樹(shù)形網(wǎng)格(TreeGrid)組件設(shè)置一個(gè)文件夾瀏覽。
創(chuàng)建樹(shù)形網(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ù)雜樹(shù)形網(wǎng)格
樹(shù)形網(wǎng)格(TreeGrid)可以展示有限空間上帶有多列和復(fù)雜數(shù)據(jù)電子表格。本教程將演示如何將表格數(shù)據(jù)排列在分割的網(wǎng)格和多行表頭中,以便組織共同的數(shù)據(jù)。
創(chuàng)建樹(shù)形網(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>
正如您所看到的,樹(shù)形網(wǎng)格(Treegrid)的使用和數(shù)據(jù)網(wǎng)格(Datagrid)一樣。請(qǐng)使用 'frozen' 屬性來(lái)定義凍結(jié)列,列的 'colspan' 和 'rowspan' 屬性來(lái)定義多行表頭。
以上就是分別為大家分享的EasyUI創(chuàng)建簡(jiǎn)單樹(shù)形網(wǎng)絡(luò)和復(fù)雜樹(shù)形網(wǎng)絡(luò)的方法,希望對(duì)大家的學(xué)習(xí)有所幫助。
想要學(xué)習(xí)更多內(nèi)容請(qǐng)查看這篇文章: 《輕松學(xué)習(xí)jQuery插件EasyUI EasyUI實(shí)現(xiàn)樹(shù)形網(wǎng)絡(luò)基本操作(2)》
相關(guān)文章
Jquery.LazyLoad.js修正版下載,實(shí)現(xiàn)圖片延遲加載插件
之前一直有關(guān)注過(guò)Jquery.LazyLoad.js這個(gè)特效,但一直沒(méi)有用,這幾天研究了一下,并應(yīng)用于實(shí)際中,對(duì)網(wǎng)站SEO方面沒(méi)有什么幫助,不過(guò)可以節(jié)省一些流量,對(duì)于大網(wǎng)站來(lái)說(shuō)顯的尤為重要,至于節(jié)省了多少流量我無(wú)從統(tǒng)計(jì)。2011-03-03jQuery EasyUI 中文API Layout(Tabs)
發(fā)布jQuery EasyUI 中文API—Layout(Tabs)總結(jié),需要的朋友可以參考下。2010-04-04jQuery ui1.7 dialog只能彈出一次問(wèn)題
之前對(duì)于刪除操作,一直使用的是頭兒寫(xiě)的通用的“確認(rèn)刪除”的方法2009-08-0820款非常優(yōu)秀的 jQuery 工具提示插件 推薦
工具提示(Tooltip)在網(wǎng)站中的一個(gè)小功能,但卻有很重要的作用,常用于顯示一些溫馨的提示信息。如果網(wǎng)站中的工具提示功能做得非常有創(chuàng)意的話(huà)能夠加深用戶(hù)對(duì)網(wǎng)站印象2012-07-07jquery實(shí)現(xiàn)滑動(dòng)樓梯效果
這篇文章主要為大家詳細(xì)介紹了jquery實(shí)現(xiàn)滑動(dòng)樓梯效果,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2021-09-09使用jQuery的easydrag插件實(shí)現(xiàn)可拖動(dòng)的DIV彈出框
EasyDrag 是一個(gè)用來(lái)實(shí)現(xiàn)頁(yè)面元素拖拉的 jQuery 插件。接下來(lái)通過(guò)本文給大家介紹使用jQuery的easydrag插件實(shí)現(xiàn)可拖動(dòng)的DIV彈出框,感興趣的朋友一起學(xué)習(xí)吧2016-02-02