文檔金喜正規買球>>jQuery EasyUI使用教程>>jQuery EasyUI使用教程:創建基本的樹網格
jQuery EasyUI使用教程:創建基本的樹網格
Kendo UI for jQuery——創建現代Web應用程序的最完整UI庫!查看詳情>>>
樹形網格組件從數據網格中繼承,但是允許在行之間存在父/子節點關系。許多屬性繼承至數據網格,可以用在樹形網格中。為了使用樹形網格,用戶必須定義 'treeField' 屬性,指明哪個字段作為樹節點。
本教程將向您展示如何使用樹形網格組件設置一個文件夾進行瀏覽。

創建樹形網格
<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示例: