樹形網格組件從數據網格中繼承,可是容許在行之間存在父/子節點關係。許多屬性繼承至數據網格,能夠用在樹形網格中。爲了使用樹形網格,用戶必須定義 'treeField' 屬性,指明哪一個字段做爲樹節點。html
本教程將向您展現如何使用樹形網格組件設置一個文件夾進行瀏覽。json
jQuery EasyUI最新試用版下載請猛戳>>ui
點擊查看示例url
建立樹形網格
1spa 2code 3htm 4blog 5繼承 6教程 7 8 9 |
< 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示例:easyui-treegrid-demo.zip
有興趣的朋友能夠點擊查看更多有關jQuery EasyUI的教程>>