jQuery EasyUI 樹形菜單 - 創建基礎樹形網格
樹形網格(TreeGrid)組件從數據網格(DataGrid)繼承,但是允許在行之間存在父/子節點關係。許多屬性繼承至數據網格(DataGrid),可以用在樹形網格(TreeGrid)中。為了使用樹形網格(TreeGrid),用戶必須定義 'treeField' 屬性,指明哪個字段作為樹節點。
本教程將向您展示如何使用樹形網格(TreeGrid)組件設置一個檔夾流覽。

創建樹形網格(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>