CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

How to get the parent node of a node?

by Ricardo Muñoz » 28 Apr 2020 19:10

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
Ricardo Muñoz
 
Posts: 28
Joined: 25 Feb 2016 23:42

by Alexander Bulei » 13 May 2020 09:28

Hi Ricardo,

On which event?
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by Ricardo Muñoz » 05 Aug 2022 18:10

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
Ricardo Muñoz
 
Posts: 28
Joined: 25 Feb 2016 23:42


Return to JQDynaTree

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.