treeview node text not displaying correctly

N

NJP

Hi Guys,

I have a simple treeview on my webform (C# 2.0). I am dynamically
populating the treeview with nodes. On my leaf nodes i want to have
text seperated by a large amount of blank space like shown below


Name BirthDay Photograph


Parent
|__Child1 20/08/1982 c:\documents
\file111\child1.jpg
|__Child2 19/02/1992 c:\documents
\file111\child2.jpg


however when I populate the treenode using the code below


TreeNode service = new TreeNode(ChildName + " " +
BirthDay + " "+ Photograph,
child.ID.ToString(),"","ChildDetails.aspx?CID=" + child.ID,"");


I get the tree below


Name BirthDay Photograph


Parent
|__Child1 20/08/1982 c:\documents\file111\child1.jpg
|__Child2 19/02/1992 c:\documents\file111\child2.jpg


All the whitespaces in between have been trimed to One whitespace.
How
can I try and make sure that I get the requisite whitespace. I have
tried \t as well but that didnt work either. Your help is much
appreciated.


Thanking You,


NJP
 
K

Kevin

Hi Guys,

I have a simple treeview on my webform (C# 2.0). I am dynamically
populating the treeview with nodes. On my leaf nodes i want to have
text seperated by a large amount of blank space like shown below

Name BirthDay Photograph

Parent
|__Child1 20/08/1982 c:\documents
\file111\child1.jpg
|__Child2 19/02/1992 c:\documents
\file111\child2.jpg

however when I populate the treenode using the code below

TreeNode service = new TreeNode(ChildName + " " +
BirthDay + " "+ Photograph,
child.ID.ToString(),"","ChildDetails.aspx?CID=" + child.ID,"");

I get the tree below

Name BirthDay Photograph

Parent
|__Child1 20/08/1982 c:\documents\file111\child1.jpg
|__Child2 19/02/1992 c:\documents\file111\child2.jpg

All the whitespaces in between have been trimed to One whitespace.
How
can I try and make sure that I get the requisite whitespace. I have
tried \t as well but that didnt work either. Your help is much
appreciated.

Thanking You,

NJP

Yep, in old-school Delphi world, there was a component for this type
of layout called TreeList. This would be basically a treeview, but
with columns
This is very difficult (if not impossible to do) with the current
rendering of the treeview in ASP.NET.

I am using a third party grid component for this type of layout (but
it is commercial)
http://www.telerik.com/demos/aspnet/Grid/Examples/Hierarchy/ThreeLevel/DefaultCS.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top