private static void UnselectAllNodes(RadTreeView treeView) { foreach (RadTreeNode node in treeView.GetAllNodes()) { node.Selected = false; } }
protected void BuildTreeView(string zoekString, RadTreeView treeView, RelationView view) { string xml = new ShareHolders().CreateXMLOrganoTreeView(zoekString, view); XElement coloredXML = XElement.Parse(xml); ColorFoundNodes(zoekString, ref coloredXML); treeView.LoadXml(coloredXML.ToString()); var nodes = treeView.GetAllNodes(); if (nodes.Count() > 0 && nodes[0].Text.Equals(zoekString)) nodes[0].BackColor = Color.Gold; }
private static void DisableNodesTarget(RadTreeView treeViewTarget, RadTreeView sourceTreeView) { var nodeTreeView = sourceTreeView.SelectedNode; var nodesTarget = treeViewTarget.GetAllNodes().Where(n => n.Text.Equals(nodeTreeView.Text)); var nodesDisabled = treeViewTarget.GetAllNodes().Where(n => n.Enabled == false); if (nodesDisabled.Count() > 0) { foreach (var node in nodesDisabled) { node.Enabled = true; } } if (nodesTarget.Count() > 0) { foreach (var node in nodesTarget) { node.Enabled = false; } } }