|
of_PopulateDDDW
|
|
Full name
|
pfc_n_cst_dwsrv.of_PopulateDDDW
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_PopulateDDDW()
|
Name
|
Datatype
|
ldwc_obj
|
DataWindowChild
|
ll_cnt
|
Long
|
ll_columncount
|
Long
|
ll_dddwcount
|
Long
|
ll_rc
|
Long
|
ls_colname
|
String
|
ls_dddwdatacolumn
|
String
|
public function integer of_PopulateDDDW ();//////////////////////////////////////////////////////////////////////////////
//
// Function:
// of_PopulateDDDW
//
// Access:
// Public
//
// Arguments:
// None
//
// Returns:
// integer
// The number of dddw-style columns populated
// -1 if an error occurs.
//
// Description:
// Populates all DDDWs on the DataWindow
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 6.0 Initial version - Replaces obsoleted function of_RefreshDDDWs(...)
//
//////////////////////////////////////////////////////////////////////////////
//
// 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_rc
Long ll_cnt
Long ll_columncount
Long ll_dddwcount
String ls_colname
String ls_dddwdatacolumn
DataWindowChild ldwc_obj
// Check required references.
If IsNull(idw_Requestor) or Not IsValid(idw_Requestor) Then Return -1
// Get the number of columns on the datawindow.
ll_columncount = Long (idw_Requestor.Describe("DataWindow.Column.Count"))
// Loop around all columns.
FOR ll_cnt=1 TO ll_columncount
// Get the current column name.
ls_colname = idw_Requestor.Describe ( "#" + String ( ll_cnt ) + ".Name" )
// Determine if the current column is a DropDownDataWindow.
ls_dddwdatacolumn = idw_Requestor.Describe ( ls_colname + ".DDDW.DataColumn" )
IF ls_dddwdatacolumn = "" OR ls_dddwdatacolumn = "?" or ls_dddwdatacolumn = "!" THEN
// Not a DropDownDataWindow.
CONTINUE
ELSE
// Get the Child reference.
ll_rc = idw_Requestor.GetChild (ls_colname, ldwc_obj)
If ll_rc > 0 Then
ll_rc = idw_requestor.event pfc_populatedddw (ls_colname, ldwc_obj)
if ll_rc < 0 then return -1
// Increment the DropDownDataWindow count.
ll_dddwcount++
End If
END IF
NEXT
Return ll_dddwcount
end function
Name
|
Owner
|
datawindow.describe |
datawindow
|
datawindow.getchild |
datawindow
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.long |
systemfunctions
|
systemfunctions.string |
systemfunctions
|
pfc_u_dw.pfc_populatedddw |
pfc_u_dw
|