|
of_refreshlevel
|
|
Full name
|
pfc_u_tv.of_refreshlevel
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_refreshlevel(integer)
|
Name
|
Datatype
|
ll_Handle
|
Long
|
public function integer of_refreshlevel (integer ai_level);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_RefreshLevel
//
// Access: public
//
// Arguments:
// ai_Level The level to be refreshed.
//
// Returns: Integer
// 1 - the TreeView was refreshed successfully
// -1 - an error occurred
//
// Description: Refresh all items in a particular level of the TreeView. This
// includes removing all lower levels (and discarding their rows
// from the DataStores) and resetting their Label and Data
// attributes from the DataStore.
//
// NOTE: If the value of any of the key columns in the DataStore
// have changed, this function will not work. It will no longer be
// able to find the proper row. In that case, get the row with
// of_GetDataRow BEFORE it is changed and call
// of_RefreshItem(al_Handle, ai_Row)
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1999 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
Long ll_Handle
// Find the first item at this level
ll_Handle = of_FindFirstItemLevel(ai_Level, 0)
If ll_Handle <=0 Then Return -1
// Refresh all items at this level
Do
If of_RefreshItem(ll_Handle) = -1 Then Return -1
ll_Handle = FindItem(NextTreeItem!, ll_Handle)
Loop Until ll_Handle <=0
Return 1
end function