我如何删除在树状视图中具有子项的父文件夹? [英] How i can delete Parent Folder which has sub items in a treeview?

查看:102
本文介绍了我如何删除在树状视图中具有子项的父文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hai,
在我的应用程序中,我使用了树状视图和上下文菜单,其中包含菜单项ADD,EDIT,DELETE,
我成功删除了单个项目,但是当我删除具有子文件夹的父文件夹时,
你能帮我吗...
谢谢.

hai,
in my app i used a treeview and a context menu wiht menu items ADD,EDIT,DELETE,
i deleted individal items successfully, but when i am deleting a parent folder which has sub folders is not deleted,
can u help me...
Thanks & Regards.

推荐答案

我已成功删除个人项目,
不确定要寻找哪种帮助,但是应该这样做:由于您已经能够删除单个项目,因此如果是父项,则需要循环执行相同的代码.您需要找到父母的孩子并逐一删除.

您可以根据需要在树形视图,数据集甚至数据库中执行此操作.试试吧!
i deleted individal items successfully,
Not sure of what kind of help you are looking for but this should do: Since you are already able to delete individual items, now in case of parent you need to execute the same code but in a loop kind of. You need to find the children of the parent and delete them one-by-one.

You can do this in treeview, in dataset or even in Database based on your need. Try!


这篇关于我如何删除在树状视图中具有子项的父文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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