Hi,
We're currently trying to use the RadTreeView to display some hierarchial data. I've created a hierarchial list of my flat data.
When I step through my code I have created the hierarchial list correctlty with each node having its parent and child lists correctly populate. When I bind the RadTreeView to the list it only displays the root element. Is it possible to use string type for id's?
Regards,
Paul.
We're currently trying to use the RadTreeView to display some hierarchial data. I've created a hierarchial list of my flat data.
public class OidInfo |
{ |
private List<OidInfo> _children = new List<OidInfo>(); |
private string _parent; |
public OidInfo() |
{ |
} |
public OidInfo(string oid, string name) |
{ |
OID = oid; |
Name = name; |
} |
public List<OidInfo> Children |
{ |
get { return _children; } |
set { _children = value; } |
} |
public string OID { get; set; } |
public string Name { get; set; } |
public string Parent |
{ |
get |
{ |
if (string.Compare(OID, "1.3.6.1.4.1.28812") == 0) |
return ""; |
string[] split = OID.Split('.'); |
var sb = new StringBuilder(); |
for (var i = 0; i < split.Length - 1; i++) |
{ |
if (i != 0) |
sb.Append("."); |
sb.Append(split[i]); |
} |
return sb.ToString(); |
} |
set { _parent = value; } |
} |
public override string ToString() |
{ |
return string.Format("{0} {1} {2}", OID, Name, Parent); |
} |
} |
When I step through my code I have created the hierarchial list correctlty with each node having its parent and child lists correctly populate. When I bind the RadTreeView to the list it only displays the root element. Is it possible to use string type for id's?
Regards,
Paul.