public void TreePageControlsSelectValue(string v) { var tree = (PXTreeView)this.SplitContainer.FindControl("TreePageControls"); PXTreeNode node = tree.EnumNodes().FirstOrDefault(n => n.Value == v); tree.SelectedNode = node; }
/// <summary> /// Fill the specified tree control by means of descriptor. /// </summary> private void FillTreeFromDescriptor(PXTreeView tree, string[] descr) { tree.Nodes.Clear(); foreach (string d in descr) { string[] pair = d.Split('|'); var node = new PXTreeNode(pair[0]); node.NavigateUrl = pair[1]; tree.Nodes.Add(node); } }
private bool IsPastingToChild(Guid checkId) { var tree = sp1.FindControl("tree") as PXTreeView; string checkdatapath = checkId.ToString(); PXTreeNode pastenode = tree.SelectedNode; while (pastenode.Parent != null) { if (pastenode.Parent.DataPath == checkdatapath) { return(true); } pastenode = pastenode.Parent; } return(false); }