473,669 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamic Tree View Control

1 New Member
Hi

Can we add dynamiclly nodes and information in tree view control.
Jan 14 '08 #1
2 1441
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

Yes, you can..
This code will add to the root:
Expand|Select|Wrap|Line Numbers
  1. TreeView1.Nodes.Add , tvwChild, , "New Root Node"
  2.  
This will add as a Child Node to selected node
Expand|Select|Wrap|Line Numbers
  1. TreeView1.Nodes.Add TreeView1.SelectedItem.Key,tvwChild, , "New Child"
  2.  
Regards
Veena
Jan 14 '08 #2
debasisdas
8,127 Recognized Expert Expert
Please find a related discussion here.
Jan 14 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2156
by: Jesper Odgaard | last post by:
Hi, I'm migrating a program to C# that I wrote using MFC. The programs GUI was split vertically in two halfs with a tree control to the left. Accordingly to the different items that could be selected in this tree view, the right side of the GUI showed different Formviews that was replaced dynamically at runtime. I would like to do the same thing in my C# version of the program. However I cant figure out which controls could
1
2174
by: Kaye | last post by:
It seems that when I dynamically resize items in a tree-view control, using TVM_SETITEM and the TVITEMEX iIntegral member, things go awry. The window draws properly, but it seems like the RECTs for the HTREEITEMs are not updating properly. This is espeically true if I update the size of an individual HTREEITEM more than once -- making it larger, and then smaller again. The tree view's scroll bar no longer works correctly -- it doesn't scroll...
1
1232
by: ronniek | last post by:
Hi, I'm trying to load a WebUserControl (.ascx) into a PlaceHolder but I keep getting an exception that the Page Tree ViewState is modified. If I load the WebUserControl by the designer (not dynamic) and it works. How can I load the WebUserControl dynamiclly so I can choose which one to load?
10
2522
by: dwok | last post by:
Does anyone know of a good article that discusses creating a "Tree View" control in ASP.NET? Or perhaps a Tree View Control that comes with source code? I have come across a lot of tree controls for ASP.NET however most of them are already compiled and don't come with source code. I am really just looking for an example on how to create my own Tree Control. Thanks a bunch.
2
3212
by: Zach | last post by:
I have a situation similar to what you see in Visual Studio Options menu. A Tree View on the left, and depending on what type of node you click it dynamically loads a panel into the right hand side of the form. It would be really nice if I could design all possible right hand side panels in the forms designer, then have some way to tell the framework "load the form represented by the class SuchAndSuchForm". What I have to resort to...
2
1640
by: mivhaelveloz | last post by:
I thought I had a good grip on viewstate handling, but am suprised by a small test: In my aspx file I have a PlaceHolder control and a button for posting back. Dynamically in Page_Load I create a TextBox, and add it as a control of PlaceHolder. I do this regardless of whether IsPostBack is true or not, to insure
0
375
by: Santosh | last post by:
Asp.Net tree view control font problem Dear all i am downloading MS tree view control . i want to change the font size and font name of the tree view control i am wrtitting code for it like if (!Page.IsPostBack) { treeview1.FontBold = true; treeview1.Font.Name = "DVB-TTSurekh";
0
1425
by: rinishrk | last post by:
Hi, I have a web application that contains subfolders Admin and User with related webpages inside them. Within the Admin folder I have a page containing a Tree View Control.I want this tree view to have nodes for all pages in the website. However it seems that I cannot create child nodes within this tree view for pages that exist outside the Admin folder.(i.e.pags within the User folder or the Root folder ).It gives me an errors stating...
0
2227
by: Scott Roberts | last post by:
I always thought that the viewstate "keys" included the control ID. As long as the control IDs were unique, there shouldn't be any conflicts. Well, it appears that that may not be the case with dynamic controls. Our application was having a problem very similar to the one described here: http://weblogs.asp.net/alessandro/archive/2008/01/04/failed-to-load-viewstate-typical-problem-with-an-obvious-solution.aspx Unfortunately, the "fix"...
0
8465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8383
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8587
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7407
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6210
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2029
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1787
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.