Web
Often we need to display in a TreeView flat, self-referencing data, loaded from a database, that has properties ID and ParentID (or similar) that define the hierarchy. The Telerik TreeView for ASP.NET can automatically bind itself to such data, but our Silverlight TreeView cannot do this out of the box. Fortunately, this “limitation” can be easily avoided with a simple value converter. There is a little trick, however – each data item needs a reference to its parent collection. Consider the following very simple data object: public class DataItem : INotifyPropertyChanged
{
private string text; public int ID { get; set; }
public int ParentID {...