TreeListNodeRefresh

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

SalBoolean TreeListNodeRefresh( SalNumber nWhat,
		             SalNumber hItem,
		             SalBoolean bCollapse )

The method will refresh data for a specific node. If node to be refreshed is collapsed. All child entries will be removed and populate will be pending. On the other hand if the node is expanded the behavior will be controlled by the bCollapse parameter. And if this parameter is set to FALSE the node will be repopulated at once.

Parameters

Name Description
SalNumber nWhat Standard method parameter. Possible values are Const.METHOD_Inquire, Const.METHOD_Execute.
SalNumber hItem Handle of the node item to refresh.
SalBoolean bCollapse This flag is used to control the list behavior. TRUE - Collapse expanded node and set populate as pending until expanded, FALSE - Repopulate at once.

Returns

The return value is TRUE if node was found, FALSE otherwise.

Example

add new C# coding.

! In this example the TreeListNodeRefresh function is used to keep data
integrity between a TreeListBox and it's corresponding detail table.

On PM_DataSourceSave (Message sent to the form on save)
  Call lbTreeList.TreeListNodeRefresh( METHOD_Execute, hCurrentNode, FALSE )
.
On PM_TreeListNodeActivate (Message sent to the TreeListBox when user selects a node)
  Call NodeActivate( wParam, lParam )
.
NodeActivate
  Select Case wParam
   Case 3 ! Article
     ! Set the current node variable to the parent node to refresh the whole parent 
     ! When changes is done to its child. 
     Set hCurrentNode = lbTreeList.GetParent( lParam )
    .
    .
   Default
     Return FALSE