Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Overriding TreeNode Class


Message #1 by "santosh" <santosh_nadgeri@s...> on Tue, 18 Jun 2002 10:22:30 +0530
Hi all,
this is regarding overriding the TreeNode class.
My requirement is I have a tree component.
Which needs to accept objects insteade of string.
So i extended the TreeNode class and for the Nodes property of this (base)
class I am passing my object.ToString().
I think it is not proper b'cos it is adding two sub nodes, first subnode is
blank and at the position where i want it,
for this node it is adding one more node which i do not require but it's
content is one which i require.
Any help regarding this.

Ex
Tree
   |__Node1
   |__Node2

Now I want to add a child node to Node1 with name Child1.
It should be like this

Tree
   |__Node1
   |      |__ Child1
   |__Node2

but what i am getting is

Tree
   |__Node1
   |      |__
   |         |__ Child1
   |__Node2



  Return to Index