of_deleteitem


pfcmain.pbl   >   pfc_u_lv   >   of_deleteitem   

Full name pfc_u_lv.of_deleteitem
Access public
Extend of integer
Return value integer
Prototype public function integer of_deleteitem(long)

Name Datatype
No Data

Name Datatype
ll_Row Long
llvi_Item ListViewItem

public function integer of_deleteitem (long al_item);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_DeleteItem
//
//	Access:  public
//
//	Arguments:
//	al_Item						The handle to the ListView item to be deleted.
//
//	Returns:		Integer
//					1	- the item was deleted successfully
//					-1	- an error occurred
//
//	Description:	Delete an item from the ListView and it's corresponding row from
//						the DataStore
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	5.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
ListViewItem	llvi_Item

If GetItem(al_Item, llvi_Item) = -1 Then Return -1

ll_Row = ids_Source.Find("pfc_lvi_key = '" + String(llvi_Item.Data) + "'", &
									1, ids_Source.RowCount())

If ll_Row <= 0 Then
	Return -1
Else
	// Delete the row
	ids_Source.DeleteRow(ll_Row)
	
	// Delete the item
	Return DeleteItem(al_Item)
End If

end function

     
Name Owner
No Data

     
Name Owner
listview.deleteitem listview
listview.getitem listview
datastore.deleterow datastore
datastore.find datastore
datastore.rowcount datastore
systemfunctions.string systemfunctions

     
Full name
No Data

     
Name Scope
No Data