formating a TreeView control

J

Jeff

Hi

..NET 3.5

I have this class I'm trying to format so its content is displayed in the
TreeView control. As it is now the TreeView only display the class names:
"Jeff.Test.Comment". Instead I would like to display some of the contents of
the Comment class

For each node I would like to display a subject and a body (in addition to
info about who posted the comment and a possibility to reply)

I didn't see any ItemTemplate or something like that in the tags belonging
to TreeView so not sure how to custom format the treeview


any suggestions?

Below you see parts of my code:

public class CommentCollection : List<Comment>, IHierarchicalEnumerable
{
public CommentCollection() : base() {}

public IHierarchyData GetHierarchyData(object enumeratedItem)
{
return enumeratedItem as IHierarchyData;
}
}
*****************
public class Comment
{
private Guid _id;
private Guid _userid;
private Guid _article;
private Guid _parent;
private string _subject;
private string _body;
private CommentCollection _replies;

public comment() {}
}
 

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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top