I’m trying to make a report treeview thing. Where I could write some text to have as a parent node, and if need be I’d add add strings as sub nodes to display some more information.
I made a report object:
public class Report
{
private List<Report> reportList = new List<Report>();
public string Text { get; set; }
public List<Report> Reports
{
get
{
return reportList;
}
set
{
reportList = value;
}
}
}
Then I’d have a Report Collection that I would then feed into a treeview itemssource, but I have no idea how to create the bindings so that it will create the subnodes properly throughtout, I tried searching google, but I couldn’t find the correct way.
Can anybody inhere help me?
You need to use a
HierarchicalDataTemplate