TreeView + sign

2019-05-07 22:12发布

I have treeview with 1 main node and several sub-nodes,

How can I hide the + sign in the main node?

Thanks,

3条回答
SAY GOODBYE
2楼-- · 2019-05-07 22:26

Treview Property: .ShowRootLines = false

When ShowRootLines is false, the Plus/Minus sign will not be shown for the root node, but will still show when necessary on child nodes.

With the Plus/Minus sign hidden, you might consider executing the Expand() method of the root node once the tree is populated. That will make sure that the root node shows all first-level child nodes.

Note: There is a ShowPlusMinus property on the TreeView, but it works on all nodes.

查看更多
Anthone
3楼-- · 2019-05-07 22:32

Set SiteMapDataSource property ShowStartingNode to false. For example:

查看更多
对你真心纯属浪费
4楼-- · 2019-05-07 22:40

See the TreeView::ShowExpandCollapse property. Set it to false to disable the expand/collapse node indicators.

查看更多
登录 后发表回答