endlabeledit


pfcmain.pbl   >   pfc_u_tv   >   endlabeledit   

Full name pfc_u_tv.endlabeledit
Access public
Extend of
Return value
Prototype event endlabeledit()

Name Datatype
No Data

Name Datatype
lds_obj n_ds
li_Index Integer
ll_Row Long
ltvi_Item TreeViewItem

event endlabeledit;//////////////////////////////////////////////////////////////////////////////
//
//	Event:  EndLabelEdit
//
//	Description:	Change the label column in the appropriate DataStore to
//						be the new label text.  This only works if the label column
//						is updatable.  If a computed column is being used for the
//						label, override this script with appropriate code.
//
//						NOTE:  Update() is NOT called for the DataStore.  This is
//						left to the user to perform.  If the label column is also part
//						of the key, or is used as a retrieval argument for any of its
//						children, this item should be refreshed with of_RefreshItem.
//
//////////////////////////////////////////////////////////////////////////////
//	
//	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_Index
Long					ll_Row
n_ds					lds_obj
TreeViewItem		ltvi_Item

if GetItem(handle, ltvi_Item) = -1 then
	return
end if

// Get the row in the DataStore
If of_GetDataRow(handle, lds_obj, ll_Row) = -1 Then
	Return
End If

// Get the label column
li_Index = UpperBound(inv_ds)
If ltvi_Item.Level < li_Index Then
	li_Index = ltvi_Item.Level
End If

// Change the value of the label column
lds_obj.SetItem(ll_Row, inv_ds[li_Index].s_LabelColumn, newtext)

end event

     
Name Owner
No Data

     
Name Owner
treeview.getitem treeview
datastore.setitem datastore
systemfunctions.upperbound systemfunctions
pfc_u_tv.of_getdatarow pfc_u_tv

     
Full name
No Data

     
Name Scope
No Data