Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / October 2007

Tip: Looking for answers? Try searching our database.

TreeView properties treeNodeSrc - treeNodeTypeSrc

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ippo - 18 Oct 2007 18:20 GMT
Hi all,
I have a silly problem with treeview. I'm using .NET 2.0. I need to
set the two properties treeNodeSrc - treeNodeTypeSrc at run time using
C#, but in the treeViews that I define, these two properties don't
exist!!!
Do I need to import something more to use all the properties of the
treeview? Right now, I 've just installed .NET 2005

Thank you all

Bruno
Robbe Morris - [MVP] C# - 18 Oct 2007 20:48 GMT
How exactly do you know you need to set two properties
that don't exist?

That said...

Use the .Tag property of the node to store a custom
class in.  Whenever you grab a node, get the custom
class back out of the .Tag

MyCustomClass blah = (MyCustomClass)node.Tag;

Signature

Robbe Morris [Microsoft MVP - Visual C#]
.NET PropertyGrid Control - ListBox, ComboBox, and Custom Classes
http://www.eggheadcafe.com/tutorials/aspnet/270e9432-d236-47e7-b1af-5cd3abe27a75
/net-propertygrid-control.aspx


> Hi all,
> I have a silly problem with treeview. I'm using .NET 2.0. I need to
[quoted text clipped - 7 lines]
>
> Bruno
ippo - 19 Oct 2007 08:44 GMT
On Oct 18, 9:48 pm, "Robbe Morris - [MVP] C#" <i...@eggheadcafe.com>
wrote:
> How exactly do you know you need to set two properties
> that don't exist?
[quoted text clipped - 24 lines]
>
> - Show quoted text -

There are a lot of example, even in MSDN environment, using that two
properties to populate a treview. My problem is just that, in my .NET
installation, I cannot see those properties. It seems they are not
part of treeview objects I define, so I was asking if there was
something to include to use all treeview webcontrols features

Thank you
Bruno
xmail123@yahoo.com - 22 Oct 2007 15:28 GMT
Since you are using a treeview I thought I would maybe you could help
me.  I am new to C# and using the treeview in Windows forms.  I can
connect to the DB (SQL 2005), create the dataadapter, populate a data
set.  The problem is how to use the dataset to populate a treeview.

I have not found a Windows Forms C# example that can handle an
unspecified level of node nesting and Parent = Child.  See child rows
15.

I would really appreciate the help.

Thank you.

I have a SQL Server 2005 table containing this data shown below.  

Child...Parent...Depth.....Hierarchy
1.........NULL.....0.........01
2..........1.......1..........01.02
5..........2.......2..........01.02.05
6..........2.......2..........01.02.06
3..........1.......1..........01.03
7..........3.......2..........01.03.07
11.........7.......3..........01.03.07.11
14.........11......4..........01.03.07.11.14
12.........7.......3..........01.03.07.12
13.........7.......3..........01.03.07.13
8..........3.......2..........01.03.08
9..........3.......2..........01.03.09
4..........1.......1..........01.04
10.........4.......2..........01.04.10
15.........NULL....0..........15
15.........15......1..........15.15
16.........15......1..........15.16
18.........16......2..........15.16.18
17.........15......1..........15.17

>Hi all,
>I have a silly problem with treeview. I'm using .NET 2.0. I need to
[quoted text clipped - 7 lines]
>
>Bruno

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.