0% found this document useful (0 votes)
22 views5 pages

UltraGrid Event Handling Functions

This document describes common anchor functions provided by TailorPro.NET to allow Progress 4GL anchor code to interact with .NET user interfaces. It includes functions for controlling fields, grids, trees and other elements as there are no standard interfaces as in Progress. Functions are provided for tasks like getting/setting values, enabling/disabling, and showing messages. Global variables also allow anchors access to session data like the user and language. TailorPro.NET translates Progress syntax to equivalent .NET functionality for different control types.

Uploaded by

chinonk
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views5 pages

UltraGrid Event Handling Functions

This document describes common anchor functions provided by TailorPro.NET to allow Progress 4GL anchor code to interact with .NET user interfaces. It includes functions for controlling fields, grids, trees and other elements as there are no standard interfaces as in Progress. Functions are provided for tasks like getting/setting values, enabling/disabling, and showing messages. Global variables also allow anchors access to session data like the user and language. TailorPro.NET translates Progress syntax to equivalent .NET functionality for different control types.

Uploaded by

chinonk
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

TailorPro.

NET Common Anchor Functions


As of 13 February 2015
Introduction
[Link] is a fundamentally different product from standard TailorPro. Standard TailorPro runs
in the highly controlled Progress environment, where widgets, events and attributes are all fixed, welldocumented, and well-known. [Link] runs in the .NET environment where most controls are
created by user interface developers, user interface environments are vastly more complex, and there
are no fixed standards for event and attribute names.
Though they share a generally similar purpose and paradigm, the code used for Standard TailorPro does
not contribute to [Link] and vice-versa. All that they share in common is that both products
store data in the Program table, and both execute server-side Progress 4GL anchor code.
Due to the significant differences between the Progress and .NET environments, the library of includes
that is available for development with standard TailorPro cannot be used with [Link]. Instead,
[Link] provides a set of user-defined functions that fulfill similar purposes. These functions
are available to any anchor program that includes tpanchdefs.i.
Basic Field Functions
DisableControl
Inputs:
Outputs:

Control name (character)


(none)

For known control types, this function attempts to disable the control in a way similar to setting
SENSITIVE to false in the Progress environment.
EnableControl
Inputs:
Outputs:

Control name (character)


(none)

For known control types, this function attempts to enable the control in a way similar to setting
SENSITIVE to true in the Progress environment.
GetScreenValue
Inputs:
Outputs:

Control name (character)


Screen-value (character)

For known control types, this function returns the value of whatever attribute has been
identified as closest in function to the Progress SCREEN-VALUE attribute. There is no
standard name for this attribute in .NET, so research may be necessary when support for a new
control type is added, to allow this function to work properly.
Note--If you get the screen value of an UltraGrid, this function will return the screen value of
the current active cell. In events related to an UltraGrid, you can use GetScreenValue to get

values from other cells in the current active row.


SetScreenValue
Inputs:
Outputs:

Control name (character)


Screen value (character)
(none)

For known control types, this function sets the value of whatever attribute has been identified as
closest in function to the Progress SCREEN-VALUE attribute. There is no standard name for
this attribute in .NET, so research may be necessary when support for a new control type is
added, to allow this function to work properly.
HideControl
Inputs:
Outputs:

Control name (character)


(none)

For known control types, this function attempts to hide the control in a way similar to setting
VISIBLE to false in the Progress environment.
ShowControl
Inputs:
Outputs:

Control name (character)


(none)

For known control types, this function attempts to show (or unhide) the control in a way similar
to setting VISIBLE to true in the Progress environment.
SetDecimalFormat
Inputs:
Control name (character)
Format value (character)
Outputs:
(none)
In the .NET UI environment, the formats of certain decimal fields may be changed without
causing errors with the QAD API. For those controls, this function may be used to set the
format of the field. The function expects a Progress-style format as the second input parameter,
and it translates this into a .NET style format.
SetFocus
Inputs:
Outputs:

Control name (character)


(none)

This function is similary to the syntax APPLY ENTRY TO widget in Progress 4GL. It moves
focus to the specified control. It should be carefully tested before it is deployed, since it may
interact in unexpected ways with LEAVE triggers on the same control, since the movement of
focus to the specified control fires the leave trigger on the control that previously had focus.
SetLabel
Inputs:
Outputs:

Control name (character)


Label value (character)
(none)

For known control types, this function sets the value of whatever attribute has been identified as
closest in function to the Progress LABEL attribute. There is no standard name for this attribute
in .NET, and often it is merely another control nearby on the screen, so research may be
necessary when support for a new control type is added to allow this function to work properly.
UltraGrid Functions
UltraGridActiveColumn
Inputs:
UltraGrid Control Name (character)
Outputs:
Active Column Name (character)
This function is intended for use in anchors on the AfterCellUpdate event of an UltraGrid.
When AfterCellUpdate fires, this function can be used to determine which cell has been
updated.
UltraGridCellValue
Inputs:
UltraGrid Control Name (character)
Row Number (integer)
Column Name (character)
Outputs:
String value of the cell (character)
For a given row in an UltraGrid, this will return the string value of a cell in the row, given the
name of the column.
UltraGridRowCount
Inputs:
UltraGrid Control Name (character)
Outputs:
Number of rows in the UltraGrid (integer)
This function returns the number of rows in an UltraGrid. This can be used with
UltraGridCellValue to iterate through the rows in an UltraGrid.
UltraGridSetActiveRowCellValue
Inputs:
UltraGrid Control Name (character)
UltraGrid Cell Name (character
New Value (character)
Outputs:
(none)
This function sets the value of a column in the active row of an UltraGrid.
UltraGridSetCellValue
Inputs:
UltraGrid Control Name (character)
Row Number (integer)
Column Name (character)
Column value (character)
Outputs:
String value of the cell (character)
For a given row in an UltraGrid, this will attempt to set the value of a cell in the row, given the

name of the column. If the datatype of the column is string, then the value will be updated
directly. If the datatype has a native Parse method, then the native Parse method will be used to
parse the string value before updating the column.
UltraTree Functions
AddUltraTreeColumn2
Inputs:
Control Name (character)
Column Key (character)
Column Label (character)
Is Editable (logical)
Order (integer)
Outputs:
(none)
This function adds a column to an UltraTreeGrid control with a specified name, key, column
label, editable attribute and column order.
Other
CancelEvent
Inputs:
Outputs:

(none)
(none)

This function cancels certain events, such as the Submitting event in EE.
GetSessionVariable
Inputs:
Variable name (character)
Outputs:
Variable value (character)
This is used in coordination with SetSessionVariable to store values during the execution of one
anchor and retrieve them during the execution of another.
SetSessionVariable
Inputs:
Variable name (character)
Variable value (character)
Outputs:
(none)
This function saves the value of a variable for later use in another anchor. The value is saved in
the client session, and is not shared with any other client. Use GetSessionVariable to retrieve the
value later.
PopupProgressFrame2
Inputs:
Frame handle (handle)
Frame title (character)
Go anchor (character)
Outputs:
(none)
This function scans an existing (though normally unrealized) Progress frame and attempts to
build the same frame on the .NET client side. The client-side frame will have buttons for OK

and Cancel, and on click of OK the anchor specified as the Go anchor in this function call
will be invoked.
ShowPopupMessage
Inputs:
Message text (character)
Outputs:
(none)
This function is similar to the MESSAGE text VIEW-AS ALERT-BOX syntax in Progress 4GL.
It should be carefully tested before it is deployed, since it may interact in unexpected ways with
LEAVE triggers on the same control, since the movement of focus to the alert box fires the
leave trigger on the control (something that does not happen in Progress).
ShowServerDocument
Inputs:
Document path (character)
Outputs:
(none)
This function sends a document from the server to the client, then uses the default action for the
document's mime type to open the document on the client side.
Note that the document path parameter specifies the location of the document on the server, not
the client.
Global Variables
[Link] anchors support a small number of global variables for convenience, though support for
these variables may not be complete in environments like EAM. All of the following variables are
defined without the NO-UNDO option.
global_domain
global_userid
global_user_lang_dir

The current domain


The current userid
The current user language directory

current_menu_uri

The URI of the current menu item

You might also like