|
doubleclicked
|
|
Full name
|
pfc_w_filterextended.dw_values.doubleclicked
|
Access
|
public
|
Extend of
|
|
Return value
|
|
Prototype
|
event doubleclicked()
|
Name
|
Datatype
|
la_val
|
any
|
lnv_string
|
n_cst_string
|
ls_coltype
|
string
|
ls_expression
|
string
|
ls_value
|
string
|
event doubleclicked;call super::doubleclicked;//////////////////////////////////////////////////////////////////////////////
//
// Event: doubleclicked
//
// Description:
// Pastes the clicked columnname into the filter expression
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
// 5.0.03 Corrected to check/build for all column types.
// 7.0 Added "char" datatype to case statement
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
any la_val
string ls_value
string ls_coltype
string ls_expression
n_cst_string lnv_string
if row > 0 then
// Get the column type.
ls_coltype = Left(this.Describe ( "#1.ColType" ), 5)
// Get the value.
la_val = inv_rowselect.of_GetItemAny (row, 1)
ls_value = String (la_val)
// Determine the correct expression.
Choose Case ls_coltype
// CHARACTER DATATYPE
Case "char(", "char"
If Pos(ls_value, '~~~"') =0 And Pos(ls_value, "~~~'") =0 Then
// No special characters found.
If Pos(ls_value, "'") >0 Then
// Replace single quotes with special chars single quotes.
ls_value = lnv_string.of_GlobalReplace(ls_value, "'", "~~~'")
End If
End If
ls_expression = "'" + ls_value + "'"
// DATE DATATYPE
Case "date"
ls_expression = "Date('" + ls_value + "')"
// DATETIME DATATYPE
Case "datet"
ls_expression = "DateTime('" + ls_value + "')"
// TIME DATATYPE
Case "time", "times"
ls_expression = "Time('" + ls_value + "')"
// NUMBER
Case Else
ls_expression = ls_value
End Choose
mle_filter.ReplaceText (ls_expression)
end if
end event
Name
|
Owner
|
datawindow.describe |
datawindow
|
multilineedit.replacetext |
multilineedit
|
systemfunctions.left |
systemfunctions
|
systemfunctions.pos |
systemfunctions
|
systemfunctions.string |
systemfunctions
|
pfc_n_cst_string.of_globalreplace |
pfc_n_cst_string
|
pfc_n_cst_dwsrv.of_GetItemany |
pfc_n_cst_dwsrv
|
datawindow.doubleclicked |
datawindow
|