|
of_GetDataRow
|
|
Full name
|
pfc_n_cst_lvsrv_datasource.of_GetDataRow
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_GetDataRow(integer,ref n_ds,ref long)
|
Name
|
Datatype
|
ll_Row
|
long
|
llvi_Item
|
listviewitem
|
ls_key
|
string
|
public function integer of_GetDataRow (integer ai_item, ref n_ds ads_source, ref long al_row);//////////////////////////////////////////////////////////////////////////////
// Public Function: of_GetDataRow
// Arguments: ai_Item The index to the ListView item for which data is desired.
// ads_Source The handle to the DataStore (of type n_ds) for the Listview.
// Passed by reference.
// al_Row The row in the DataStore that the item points to. Passed by reference.
// Returns: Integer
// 1 - the item's data was found
// -1 - the item or row was not found
// Description: Return the DataStore and row a particular item in the ListView points
// to. This allows the user to update this row any way they wish.
//////////////////////////////////////////////////////////////////////////////
// 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
string ls_key
listviewitem llvi_Item
// check reference variables
if IsNull(ilv_requestor) or not IsValid(ilv_requestor) then return -1
if IsNull(ai_item) or (ai_item < 1) then return -1
if ilv_requestor.GetItem(ai_Item, llvi_Item) = -1 then return -1
ads_Source = inv_Attrib.ids_Source
if IsNull(inv_Attrib.ids_Source) or not IsValid (inv_Attrib.ids_Source) then return -1
// find the row
ls_key = of_DecodeKey( String(llvi_item.Data) )
ll_row = ads_Source.GetRowFromRowID( long(ls_key) )
//ll_Row = ads_Source.Find("pfc_lvi_key = '" + String(llvi_Item.Data) + "'", &
// 1, ads_Source.RowCount())
if ll_Row <= 0 then
return -1
else
al_Row = ll_Row
return 1
end if
end function
Name
|
Owner
|
listview.getitem |
listview
|
datastore.getrowfromrowid |
datastore
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.long |
systemfunctions
|
systemfunctions.string |
systemfunctions
|
pfc_n_cst_lvsrv_datasource.of_DecodeKey |
pfc_n_cst_lvsrv_datasource
|