Re: TreeView properties treeNodeSrc - treeNodeTypeSrc

Tech-Archive recommends: Fix windows errors by optimizing your registry



On Oct 18, 9:48 pm, "Robbe Morris - [MVP] C#" <i...@xxxxxxxxxxxxxxx>
wrote:
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;

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

"ippo" <ippolito79-...@xxxxxxxx> wrote in message

news:1192728029.376279.70930@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



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- Hide quoted text -

- 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

.



Relevant Pages

  • Re: TreeView properties treeNodeSrc - treeNodeTypeSrc
    ... Use the .Tag property of the node to store a custom ... I have a silly problem with treeview. ... set the two properties treeNodeSrc - treeNodeTypeSrc at run time using ...
    (microsoft.public.dotnet.languages.csharp)
  • am i using the tag property the right way? please take a look ...
    ... managed to get this functionality by storing a RTF string in the tag ... On every 'before update' of the treeview I ... the selected tag property into the rich text box. ... Would it be better for me to have a new class with a richtext property ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Getting back objects from treenode.tag
    ... Since the Tag property returns an Object you won't see your custom method on ... > made a method GetID in my struct but I can't seem to call it, ...
    (microsoft.public.dotnet.framework.compactframework)
  • RE: Inheriting from the TreeNode class
    ... As for the creating custom TreeView with custom TreeNode class question, ... | I want to use the inherited TreeNode class to attach custom properties to ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: My override to OnPaint(...) does not work ?
    ... it uses his own implementation instead of custom drawing the treeview ... it by the custom draw feature of treeview on your own. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)