pfc_postopen


pfcdwsrv.pbl   >   pfc_w_sortsingle   >   pfc_postopen   

Full name pfc_w_sortsingle.pfc_postopen
Access public
Extend of
Return value
Prototype event pfc_postopen()

Name Datatype
No Data

Name Datatype
li_i integer
li_numcolssort integer
ll_found long
ls_currsortcol string
ls_currsortdisplayname string

event pfc_postopen;//////////////////////////////////////////////////////////////////////////////
//
//	Event Name:  pfc_postopen
//
//	Description:  Populate the columns list and add the previous sort
//
//////////////////////////////////////////////////////////////////////////////
//	
//	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_found
integer	li_numcolssort, li_i
string	ls_currsortcol, ls_currsortdisplayname='*none*'

ddlb_sort.SetReDraw (FALSE)

// Get the first column of the Current Sort.
If UpperBound (inv_sortattrib.is_origcolumns) > 0 Then
	ls_currsortcol = inv_sortattrib.is_origcolumns[1]
End If

// Add the [None] option first.
ddlb_sort.AddItem (NONE)

// Populate the listbox with the column names.
// Convert the first column of the Current Sort to its display name.
li_numcolssort = UpperBound ( inv_sortattrib.is_sortcolumns )
FOR li_i = 1 to li_numcolssort
	// Populate the listbox with the column names.	
	ddlb_sort.AddItem (inv_sortattrib.is_colnamedisplay[li_i])
	
	// Convert the first column of the Current Sort to its display name.
	If ls_currsortcol = inv_sortattrib.is_sortcolumns[li_i] Then
		ls_currsortdisplayname = inv_sortattrib.is_colnamedisplay[li_i]
	End If
NEXT 

// Find the original sort column.
ll_found = ddlb_sort.FindItem(ls_currsortdisplayname, 0)
If IsNull(ll_found) or ll_found <= 0 Then
	// If no match is found then select the [None].
	ll_found = 1
End If

// Set the original sort column.
ddlb_sort.SelectItem(ll_found)
IF inv_sortattrib.is_origorder[1] = "A" THEN 
	cbx_asc.checked = TRUE
ELSE 
	cbx_asc.checked = FALSE
END IF 

ddlb_sort.SetReDraw (TRUE)
end event

     
Name Owner
No Data

     
Name Owner
dragobject.setredraw dragobject
dropdownlistbox.additem dropdownlistbox
dropdownlistbox.finditem dropdownlistbox
dropdownlistbox.selectitem dropdownlistbox
systemfunctions.isnull systemfunctions
systemfunctions.upperbound systemfunctions

     
Full name
pfc_w_sortsingle
pfc_w_sortsingle.cbx_asc

     
Name Scope
No Data