jQuery EasyUI 教程
樹(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),用戶必須定義 'treeField' 屬性,指明哪個(gè)字段作為樹(shù)節(jié)點(diǎn)。
本教程將向您展示如何使用樹(shù)形網(wǎng)格(TreeGrid)組件設(shè)置一個(gè)文件夾瀏覽。
????<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>