PC Review


Reply
Thread Tools Rate Thread

Where is the asp:TreeNode control in the toolbox

 
 
Tony Johansson
Guest
Posts: n/a
 
      22nd Jan 2011
Hello!

When I look in the toolbox I can't find the TreeNode. but the TreeView
control is there
Is it meant that I should enter the TreeNode control by hand.
I have looked everywhere in the Toolbox but no TreeNode control.

//Tony


 
Reply With Quote
 
 
 
 
Jeff Johnson
Guest
Posts: n/a
 
      24th Jan 2011

"Tony Johansson" <(E-Mail Removed)> wrote in message
news:iheso0$6hi$(E-Mail Removed)...

> When I look in the toolbox I can't find the TreeNode. but the TreeView
> control is there
> Is it meant that I should enter the TreeNode control by hand.
> I have looked everywhere in the Toolbox but no TreeNode control.


The toolbox only contains "standalone" controls. A tree node must belong to
a tree view, so it isn't standalone, and therefore you won't find it in the
toolbox. What in the world are you trying to do that you think you need to
put a tree node directly on a form?


 
Reply With Quote
 
Tony Johansson
Guest
Posts: n/a
 
      24th Jan 2011

"Jeff Johnson" <(E-Mail Removed)> skrev i meddelandet
news:ihiubg$rto$(E-Mail Removed)...
>
> "Tony Johansson" <(E-Mail Removed)> wrote in message
> news:iheso0$6hi$(E-Mail Removed)...
>
>> When I look in the toolbox I can't find the TreeNode. but the TreeView
>> control is there
>> Is it meant that I should enter the TreeNode control by hand.
>> I have looked everywhere in the Toolbox but no TreeNode control.

>
> The toolbox only contains "standalone" controls. A tree node must belong
> to a tree view, so it isn't standalone, and therefore you won't find it in
> the toolbox. What in the world are you trying to do that you think you
> need to put a tree node directly on a form?
>

I do know that a TreeNode must belong to a TreeView but I just thought that
when a TreeView exist then a TreeNode would also exist.

//Tony


 
Reply With Quote
 
Jeff Johnson
Guest
Posts: n/a
 
      24th Jan 2011
"Tony Johansson" <(E-Mail Removed)> wrote in message
news:ihk25l$qnf$(E-Mail Removed)...

>>> When I look in the toolbox I can't find the TreeNode. but the TreeView
>>> control is there
>>> Is it meant that I should enter the TreeNode control by hand.
>>> I have looked everywhere in the Toolbox but no TreeNode control.

>>
>> The toolbox only contains "standalone" controls. A tree node must belong
>> to a tree view, so it isn't standalone, and therefore you won't find it
>> in the toolbox. What in the world are you trying to do that you think you
>> need to put a tree node directly on a form?
>>

> I do know that a TreeNode must belong to a TreeView but I just thought
> that when a TreeView exist then a TreeNode would also exist.


If you were hoping to drop a tree view onto a page and then start dragging
tree nodes onto it, it just doesn't work that way. However, the TreeView
control has an Edit Node command which brings up a dialog to declare nodes
at design time if you don't want to write code.

Here's a hint for determining whether or not something ought to appear in
the toolbox or not: look at its inheritance hierarchy. If one of the class's
ancestors doesn't have "control" or "component" somewhere in its name, you
almost certainly won't find it in the toolbox.

TreeView looks like this:

public class TreeView : HierarchicalDataBoundControl, IPostBackEventHandler,
IPostBackDataHandler, ICallbackEventHandler

TreeNode like this:

public class TreeNode : IStateManager, ICloneable


 
Reply With Quote
 
Tony Johansson
Guest
Posts: n/a
 
      24th Jan 2011

"Jeff Johnson" <(E-Mail Removed)> skrev i meddelandet
news:ihk5hp$ttu$(E-Mail Removed)...
> "Tony Johansson" <(E-Mail Removed)> wrote in message
> news:ihk25l$qnf$(E-Mail Removed)...
>
>>>> When I look in the toolbox I can't find the TreeNode. but the TreeView
>>>> control is there
>>>> Is it meant that I should enter the TreeNode control by hand.
>>>> I have looked everywhere in the Toolbox but no TreeNode control.
>>>
>>> The toolbox only contains "standalone" controls. A tree node must belong
>>> to a tree view, so it isn't standalone, and therefore you won't find it
>>> in the toolbox. What in the world are you trying to do that you think
>>> you need to put a tree node directly on a form?
>>>

>> I do know that a TreeNode must belong to a TreeView but I just thought
>> that when a TreeView exist then a TreeNode would also exist.

>
> If you were hoping to drop a tree view onto a page and then start dragging
> tree nodes onto it, it just doesn't work that way. However, the TreeView
> control has an Edit Node command which brings up a dialog to declare nodes
> at design time if you don't want to write code.
>
> Here's a hint for determining whether or not something ought to appear in
> the toolbox or not: look at its inheritance hierarchy. If one of the
> class's ancestors doesn't have "control" or "component" somewhere in its
> name, you almost certainly won't find it in the toolbox.
>
> TreeView looks like this:
>
> public class TreeView : HierarchicalDataBoundControl,
> IPostBackEventHandler, IPostBackDataHandler, ICallbackEventHandler
>
> TreeNode like this:
>
> public class TreeNode : IStateManager, ICloneable
>


Good explained Jeff

//Tony


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
treenode within a listview control moni Microsoft C# .NET 3 25th Aug 2006 02:34 PM
Treeview: inactive control to active control changes selected treenode Robert Linder Microsoft Dot NET Framework Forms 1 6th Oct 2005 12:53 AM
Problem: Control Toolbox Control resizes when clicked =?Utf-8?B?RWQ=?= Microsoft Excel Programming 1 27th Jul 2005 07:55 AM
creating a custom control that extends the DataGrid control and can be placed on the toolbox problem Wiredless Microsoft Dot NET Compact Framework 3 3rd Jun 2005 06:44 AM
Controls Toolbox control vs Form Toolbox control =?Utf-8?B?VG9ueV9WQkFDb2Rlcg==?= Microsoft Excel Programming 3 28th Jan 2005 08:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:41 PM.