如何在运行时添加新的子节点 [英] How to add new child node at runtime
本文介绍了如何在运行时添加新的子节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在asp .net页面上使用Treeview控件。我在树视图中有父节点和子节点。我的要求是当我右键单击Treeview时,它应该允许我在父节点中添加新的子节点。我想在treeview中提供文本框,输入的值应该作为新的子节点添加。是否有可能在代码隐藏。
提前谢谢
Hi,
I am using Treeview control on my asp .net page. I am having parent and child nodes in my treeview. My requirement is when i right click on Treeview it should allow me to add new child node in parent node. I want to provide textbox in treeview and entered value should be added as new child node. Is it possible in codebehind.
Thanks in advance
推荐答案
它是Form App的一个例子,但你当然可以从中得到一个参考:
http://www.c-sharpcorner.com/uploadfile/9f4ff8/add-root-node-child-node-to-a-treeview-selected-node -at-runtime-and-rename-the-selected-node / [ ^ ]
Its an example of Form App but you can certainly have a reference from it :
http://www.c-sharpcorner.com/uploadfile/9f4ff8/add-root-node-child-node-to-a-treeview-selected-node-at-runtime-and-rename-the-selected-node/[^]
这篇关于如何在运行时添加新的子节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文