如何使用C sharp编码取消选中TreeviewCheckbox的所有节点和子节点 [英] How to Uncheck the all Nodes and ChildNodes of TreeviewCheckbox using C sharp codings

查看:100
本文介绍了如何使用C sharp编码取消选中TreeviewCheckbox的所有节点和子节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我在Windows应用程序中使用Treeview Control和Checkbox,我想取消选中Treeview中的所有复选框,但不使用FOR LOOP。如果我使用FOR LOOp意味着它花费很长时间,如果我有大数据意味着,那么任何人都可以建议我取消选中Treeview中的所有节点和ChildNodes而不使用FOR LOOP。 :) 提前致谢。 :)

Hi Friends,

I am using Treeview Control with Checkbox in my windows application , i want to uncheck all the checkbox in Treeview but WITHOUT using FOR LOOP. If i use FOR LOOp means its taking long time if i have vry large data means , So can any one suggest me to Uncheck all Nodes and ChildNodes in Treeview WITHOUT using FOR LOOP. :) Thanks in Advance. :)

推荐答案

参见

签和取消选中-所有的节点的最树 - 视图 - 在-C-尖锐 [ ^ ]



请注意,您试图避免浏览元素,当然不可能

解决方案可能会有所不同,使用迭代或递归。



你可以选择做的另一件事是做懒惰的uhchecking,意思是您只取消选中显示的节点,当有人打开树节点时,也取消选中所有节点。

这种方法有它的缺点,如果你的应用程序突然掉落那些未打开的未更改,但我想如果取消检查对你来说太长,那么你可能也使用延迟加载节点...



*取消选中所有节点的树有多大这么耗时?



祝你好运,

Edo
See
check-and-uncheck-all-the-nodes-of-the-tree-view-in-c-sharp[^]

Note that you tried to avoid going through the elements, which of course is impossible.
the solutions could vary, using iteration or recursion.

Another thing you can optionally do is do lazy uhchecking, meaning that you uncheck only the displayed nodes, and when someone opens tree nodes uncheck all those as well.
This approach has its disadvantages like if your app drops suddenly those unopened are unchanged, but I guess if unchecking takes too long for you, then you probably used lazy loading of the nodes too...

* How big is your tree that unchecking all nodes is so time consuming??

Good luck,
Edo


这篇关于如何使用C sharp编码取消选中TreeviewCheckbox的所有节点和子节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆