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() {}
}
..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() {}
}