|
of_getdatarow
|
|
Full name
|
pfc_u_tv.of_getdatarow
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_getdatarow(long,ref n_ds,ref long)
|
Name
|
Datatype
|
li_Level
|
Integer
|
ll_Row
|
Long
|
ltvi_Item
|
TreeViewItem
|
public function integer of_getdatarow (long al_handle, ref n_ds ads_obj, ref long al_row);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_GetDataRow
//
// Access: public
//
// Arguments:
// al_Handle The handle to the TreeView item for which data is desired.
// ads_obj The handle to the DataStore (of type n_ds) for the item's
// level. 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 TreeView points
// to. This allows the user to update this row any way they wish.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
Integer li_Level
Long ll_Row
TreeViewItem ltvi_Item
If GetItem(al_Handle, ltvi_Item) = -1 Then Return -1
li_Level = UpperBound(inv_ds)
If ltvi_Item.Level < li_Level Then li_Level = ltvi_Item.Level
ads_obj = inv_ds[li_Level].ds_obj
if IsNull(inv_ds[li_level].ds_obj) Or not IsValid (inv_ds[li_level].ds_obj) then
return -1
end if
ll_Row = ads_obj.Find("pfc_tvi_key = '" + String(ltvi_Item.Data) + "'", &
1, ads_obj.RowCount())
If ll_Row <= 0 Then
Return -1
Else
al_Row = ll_Row
Return 1
End If
end function
Name
|
Owner
|
treeview.getitem |
treeview
|
datastore.find |
datastore
|
datastore.rowcount |
datastore
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.string |
systemfunctions
|
systemfunctions.upperbound |
systemfunctions
|