JVCL Help:TJvCustomDBTreeView.RefreshChild

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Summary

Ensures that child nodes for a specified tree node are calculated and refreshed.


Pascal

 procedureRefreshChild(ANode: TJvDBTreeNode);


Parameters

Parameters Description
ANode: TJvDBTreeNode Node needing to refresh its' list of child nodes.


Description

RefreshChild is a method used to ensure that the child nodes for the tree node specified in ANode are calculated and refreshed. When ANode contains the value Nil, the entire tree is refreshed.
RefreshChild requires that an active dataset be attached to the DataSource for the data-aware tree view. If the dataset is not active, or the tree view is already in the process of rebuilding its' nodes, no additional action is performed.
RefreshChild calls UpdateLock to signal that an update is in progress, and removes any existing child nodes for the tree node specified in ANode.
RefreshChild iterates over rows in the DataLink starting with the value specified in MasterField for the node in ANode. When a value is located in DetailField that matches the MasterValue for the node in ANode, it is added as a child node. It is also considered a child node if the string content for DetailField returns a value stating with '-' ('-' for string fields or a negative value for numeric fields).
Set UseFilter to True to indicate that a dataset filter expression can be used to located rows having data related to the current node. When UseFilter contains False, the data in the dataset must be ordered in the manner required to build the tree using values in MasterField and DetailField.
The values in the field specified by IconField is used in the ImageIndex property, and incremented by an existing SelectIndex value for use when a tree node is selected.
RefreshChild calls UpdateUnLock to signal that the update is complete prior to exiting from the method.
RefreshChild is called in the implementation of other methods in TJvDBTreeView, including:

Changing the value in MasterField, DetailField, ItemField, or IconField properties.
Expanding tree nodes.
DragAndDrop operations.
Adding nodes in the tree.


About

Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page