在运行时添加treeview的子节点 [英] add child node of treeview at runtime

查看:57
本文介绍了在运行时添加treeview的子节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的要求是在父控件下的Treeview控件中添加一个节点,即父名称由组合框指定,子名称由文本框指定.

页面treeview加载时显示了三个父节点.现在,用户从组合框中选择父节点,然后通过文本框选择子节点名称.当我单击确定"时,chid节点位于该父节点下.

另外,应该有一个选项,例如用户是要输入新节点还是在现有节点下输入子节点.

只有2个级别.

例如

管理员

1.1

1.2

用户

2.1

2.2

因此,现在我应该在组合框中选择是否要添加新节点(例如3),还是要在1或2下添加子节点.

如果添加一个新节点,则它将自动进入Dropdown控件.

my requirement is to add a node in the Treeview control under parent control i.e parent name is given by combobox and child name is given by textbox.

on load of page treeview is shown with three parent node. Now user select the parent node from combobox and wirte child node name through textbox. when i click ok chid node come under that parent node.

Also, there should be an option like whether user wants to enter a new node or enter a child node under existing node.

There are only 2 levels.

Ex.

Administrator

1.1

1.2

user

2.1

2.2

So now I should have the option in a combobox that whether I want to add a new node (for ex. 3) or I want to add a child node under 1 or 2.

If I add a new node, then it should automatically come into the Dropdown control.

推荐答案

为什么不尝试使用谷歌搜索?
why do not you try some googling?


这篇关于在运行时添加treeview的子节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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