问题描述
有没有办法强制 TreeNode 。当 TreeNode.ChildNodes 集合为 时,扩展符号 [+] 将只显示在 TreeNode 具有 TreeNode.PopulateOnDemand 属性设置为 true 的对象。
2- Set the TreeNode.PopulateOnDemand to True for each branch TreeNode. When the TreeNode.ChildNodes collection is empty, the expansion symbol [+] will be showed only next to TreeNode objects that has TreeNode.PopulateOnDemand property set to true.
3-处理事件来扩展分支节点。当 TreeNode - 将 TreeNode.PopulateOnDemand 设置为 true 时,此事件将触发 - 在 TreeView.TreeNodeExpanded 事件被触发之前已被扩展。
3- Handle the TreeView.TreeNodePopulate event to poulate branch nodes on expansion. This event will be fired when a TreeNode - with the TreeNode.PopulateOnDemand set to true - has been expanded right before the TreeView.TreeNodeExpanded event gets fired.
这篇关于ASP.NET TreeView并根据需要加载数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!