of_additem


pfcmain.pbl   >   pfc_u_tvs   >   of_additem   

Full name pfc_u_tvs.of_additem
Access public
Extend of long
Return value long
Prototype public function long of_additem(long,any[])

Name Datatype
No Data

Name Datatype
lds_datastore n_ds
ll_newindex long
ll_row long

public function long of_additem (long al_parent, any aa_columnvalues[]);//////////////////////////////////////////////////////////////////////////////
//
//	Function:	of_AddItem
//
//	Access:		public
//
//	Arguments:
//	al_parent			The handle to the Treeview item to place retrieved data under
//	aa_ColumnValues[]	The array containing the data to be used for the new item.
//
//	Returns:		Long
//					Returns the handle of the item if it was added successfully, 
//					-1 if an error occurrs.
//
//	Description:	Add a new item to the treeview using a inserted row.  The row does
//						not have to be added to the datastore first using this method.  Pass
//						the row in with the aa_columnvalues array.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 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, ll_newindex
n_ds					lds_datastore

// check the arguments
If upperbound(aa_columnvalues) < 1 then return -1
If (al_parent < 0) or IsNull(al_parent) Then Return -1

// Create the storage datastore
lds_datastore = create n_ds

If isvalid(inv_levelsource) then
	If inv_levelsource.of_ConvertToRow(al_parent, aa_columnvalues, lds_datastore, ll_row) <> 1 Then
		Destroy lds_datastore
		Return -1
	End If
Else
	Destroy lds_datastore
	Return -1
End If

// Add the item to the listview
ll_newindex = this.event pfc_additem(al_parent, lds_datastore, ll_row)

Destroy lds_datastore

return ll_newindex
end function

     
Name Owner
No Data

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.upperbound systemfunctions
pfc_n_cst_tvsrv_levelsource.of_converttorow pfc_n_cst_tvsrv_levelsource
pfc_u_tvs.pfc_additem pfc_u_tvs

     
Full name
No Data

     
Name Scope
No Data