|
pfc_refreshitem
|
|
Full name
|
pfc_n_cst_lvsrv_datasource.pfc_refreshitem
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
event integer pfc_refreshitem(integer)
|
Name
|
Datatype
|
lds_Source
|
n_ds
|
ll_Row
|
long
|
llvi_Item
|
listviewitem
|
event pfc_RefreshItem;//////////////////////////////////////////////////////////////////////////////
// Event: pfc_RefreshItem
// Arguments: ai_index The index of the item to be refreshed.
// Returns: Integer
// 1 if successfull
// -1 if an error occurred
// Description: Refresh an item in the ListView. Reset all its attributes to the
// default values based on the data in the DataStore.
//////////////////////////////////////////////////////////////////////////////
// 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.
//////////////////////////////////////////////////////////////////////////////
long ll_Row
listviewitem llvi_Item
n_ds lds_Source
// Check reference variables
if IsNull(ilv_requestor) or not IsValid(ilv_requestor) then return -1
// Check Arguments
if IsNull(ai_index) or (ai_index < 0) then return -1
// Get the item
if ilv_requestor.GetItem(ai_index, llvi_Item) <> 1 then return -1
// Get the corresponding row in the DataStore
if this.of_GetDataRow(ai_index, lds_Source, ll_Row) <> 1 then return -1
// Set the item's attributes
ilv_requestor.event pfc_SetItemAttributes(lds_source, ll_row, llvi_item)
// Perform the Prerefreshitem logic if needed
ilv_requestor.event pfc_PreRefreshItem(ai_index, lds_source, ll_row, llvi_item)
// Refresh the item
return ilv_requestor.SetItem(ai_index, llvi_Item)
end event