appendNode()

apendNode() is used to add a new node within a specified parent. One should use the method to modify a tree table widget array during a dialog execution. It is possible to fill the program array from BEFORE DISPLAY and BEFORE DIALOG control blocks before the dialog execution starts.

The method needs two arguments:

CALL DIALOG.AppendNode("screen_array", index)

The screen_array argument passes the name of a screen array which identifies the tree. The index attribute passes the index of the parent node.

There is some specifics about using variables with ui.Dialog methods.

You can learn about them here.

When new rows are added to a tree table widget, the new node and parent node id is used for creating the structure of the internal tree. appendNode() passes the index of the parent node, and the new node will be appended under it.

In a program array, the parent-id member which belongs to the new node is initialized automatically and gets the id value of the parent node identifier using the index argument. After that, the whole tree structure is re-built.

If zero is passed as a parent index, the method will create a new root node and append it to the tree.

In the program array, the parent node id member specified by the index will be automatically set to the parent-id member of the new node.

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.