Hi,
I am testing out your treeview component, using loading on demand from a webservice (as in your example) It works but the nodes created by the webservice had have no text or value when they are created, any ideas why this is happening?
This is the webservice method, I have debugged it and node.Text and node.Value both have values when this method is processing.
[WebMethod]
public RadTreeNodeData[] GetNodes(RadTreeNodeData node, object context)
{
List<RadTreeNodeData> result = new List<RadTreeNodeData>();
MasterSystem aSystem = (MasterSystem)Application["MasterSystem"];
ExtensionHierarchyObject aGroup = aSystem.ExtensionsSystem.ExtensionHierarchy._GroupFlatList.Find(delegate(ExtensionHierarchyObject g) { return g.GroupId == Convert.ToInt16(node.Value); });
foreach (ExtensionHierarchyObject aObj in aGroup.ChildGroups)
{
RadTreeNodeData newNode = new RadTreeNodeData();
node.Text = aObj.GroupName;
node.Value = aObj.GroupId.ToString();
newNode.ExpandMode = TreeNodeExpandMode.WebService;
result.Add(newNode);
}
return result.ToArray();
}
I am testing out your treeview component, using loading on demand from a webservice (as in your example) It works but the nodes created by the webservice had have no text or value when they are created, any ideas why this is happening?
This is the webservice method, I have debugged it and node.Text and node.Value both have values when this method is processing.
[WebMethod] |
public RadTreeNodeData[] GetNodes(RadTreeNodeData node, object context) |
{ |
List<RadTreeNodeData> result = new List<RadTreeNodeData>(); |
MasterSystem aSystem = (MasterSystem)Application["MasterSystem"]; |
ExtensionHierarchyObject aGroup = aSystem.ExtensionsSystem.ExtensionHierarchy._GroupFlatList.Find(delegate(ExtensionHierarchyObject g) { return g.GroupId == Convert.ToInt16(node.Value); }); |
foreach (ExtensionHierarchyObject aObj in aGroup.ChildGroups) |
{ |
RadTreeNodeData newNode = new RadTreeNodeData(); |
node.Text = aObj.GroupName; |
node.Value = aObj.GroupId.ToString(); |
newNode.ExpandMode = TreeNodeExpandMode.WebService; |
result.Add(newNode); |
} |
return result.ToArray(); |
} |
[WebMethod]
public RadTreeNodeData[] GetNodes(RadTreeNodeData node, object context)
{
List<RadTreeNodeData> result = new List<RadTreeNodeData>();
MasterSystem aSystem = (MasterSystem)Application["MasterSystem"];
ExtensionHierarchyObject aGroup = aSystem.ExtensionsSystem.ExtensionHierarchy._GroupFlatList.Find(delegate(ExtensionHierarchyObject g) { return g.GroupId == Convert.ToInt16(node.Value); });
foreach (ExtensionHierarchyObject aObj in aGroup.ChildGroups)
{
RadTreeNodeData newNode = new RadTreeNodeData();
node.Text = aObj.GroupName;
node.Value = aObj.GroupId.ToString();
newNode.ExpandMode = TreeNodeExpandMode.WebService;
result.Add(newNode);
}
return result.ToArray();
}