[转载]Create a Basic TreeGrid - jQuery EasyUI

[转载]Create a Basic TreeGrid – jQuery EasyUI.

The TreeGrid component extend from DataGrid but allowing a parent/child relationship between rows. Many properties extended from DataGrid can be used in TreeGrid. To use the TreeGrid, users must define the ‘treeField’ property that indicate which field to display as tree node.

This tutorial will show you how to set up the folder browser using the TreeGrid component.

View Demo

Build the TreeGrid

  1. <table id=“test” title=“Folder Browser” class=“easyui-treegrid” style=“width:400px;height:300px”
  2. url=“data/treegrid_data.json”
  3. rownumbers=“true”
  4. idField=“id” treeField=“name”>
  5. <thead>
  6. <tr>
  7. <th field=“name” width=“160”>Name</th>
  8. <th field=“size” width=“60” align=“right”>Size</th>
  9. <th field=“date” width=“100”>Modified Date</th>
  10. </tr>
  11. </thead>
  12. </table>

Download the EasyUI example:



赞(0) 打赏
分享到: 更多 (0)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏