|
pfc_refresh
|
|
Full name
|
pfc_n_cst_lvsrv_datasource.pfc_refresh
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
event integer pfc_refresh()
|
Name
|
Datatype
|
lds_data
|
n_ds
|
event pfc_Refresh;//////////////////////////////////////////////////////////////////////////////
// Event: pfc_Refresh
// Arguments: None
// Returns: long
// # of items refreshed successfully
// -1 = an error occurred
// Description: Refresh the ListView with items from the data source.
// Do not re-retrieve the data.
//////////////////////////////////////////////////////////////////////////////
// Rev. History: Version
// 6.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.
//////////////////////////////////////////////////////////////////////////////
n_ds lds_data
// Check reference variables
if IsNull(ilv_requestor) or not IsValid(ilv_requestor) then return -1
SetPointer(HourGlass!)
// Refresh the listview
if ilv_requestor.DeleteItems() < 1 then return -1
// Reset the undo delete variables because indexes change when re-adding items
this.of_ClearUndo()
// Get the data
this.of_GetDataSource(lds_data)
// add the retrieved rows to the listview
return ilv_requestor.event pfc_AddAll(lds_data)
end event