Page 1 of 1

How to get the parent node of a node?

PostPosted: 28 Apr 2020 19:10
by Ricardo Muñoz
Hi,

How to get the parent node of a node? I couldn't find any TIWCGJQDynaTree, JQDynaTreeOptions or TIWCGJQDynaTreeNode method to get it.

TIA,
Ricardo

Re: How to get the parent node of a node?

PostPosted: 13 May 2020 09:28
by Alexander Bulei
Hi Ricardo,

On which event?

Re: How to get the parent node of a node?

PostPosted: 05 Aug 2022 18:10
by Ricardo Muñoz
Hi Alexander,

At any particular event. Now, what I need to do is a code that modifies the DynaTree so that all the selected Nodes (CheckBox or RadioButton) are visible, that is, that its parent node (and all its ancestors) are displayed expanded. So that no selected node is hidden behind an unexpanded node.

My code would be something like
Code: Select all
for i := 0 to DynaTree.Nodes.Count -1 do
begin
  if DynaTree.Nodes[i].Select then
  begin
    Node := DynaTree.Nodes[i].GetParent       //   <-- Something like that, that other treeview have
    if Node <> nil then
      Node.Expand := True;
  end;
end;


TIA,
Ricardo