How to show tree lines in second column in a TreeTable

蹲街弑〆低调 提交于 2020-01-15 07:21:35

问题


I am using TreeTable (com.jidesoft.grid, see TreeTable) to display hierarchical data, which uses a special cell renderer on the first column to paint +/- icon as well as tree line. So, a typical View appears as following:

|   Column1  | Column2      |
-----------------------------
|+Item1      | Item4        |
| -Item2     | Item5        |
|   item3    | item6        |

While I want the following view for my TreeTable, with +/- buttons and tree lines in second column:

|   Column1 | Column2       |
-----------------------------
|Item1      | +Item4        |
|Item2      |  -Item5       |
|item3      |    item6      |

I have seen an example and know this is possible, but don't know how to implement this. Any suggestions?


回答1:


Try TreeTable.setExpandableColumn method.



来源:https://stackoverflow.com/questions/9987725/how-to-show-tree-lines-in-second-column-in-a-treetable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!