Consultor Eletrônico



Kbase P169825: NETUI: Is there an equivalent to the RETURN NO-APPLY statement when it comes to working with the Inf
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   20/07/2010
Status: Unverified

GOAL:

NETUI: Is there an equivalent to the RETURN NO-APPLY statement when it comes to working with the Infragistics UltraGrid or other GUI for .NET events?

GOAL:

Can the events of the Infragistics UltraGrid and other GUI for .NET controls always be cancelled?

GOAL:

What determines whether an Infragistics or GUI for .NET event is cancellable or not?

FACT(s) (Environment):

Windows
OpenEdge 10.2B
OpenEdge Category: NETUI

FIX:

Strictly speaking, there is no equivalent construct in the GUI for .NET for the 4GL/ABL RETURN NO-APPLY statement. Some GUI for .NET events are cancellable and some are not. For example, closing a form can be cancelled in a FormClosing event handler by setting the Cancel property of the FormClosingEventArgs object to true. In general, when working with GUI for .NET events, if the event does not provide a mechanism to cancel it, then the developer can not cancel the event.
The Infragistics online documentation has few examples C# and Visual Basic sample code demonstrating cancellable event classes and their use. The following cancellable event classes are listed in the Infragistics.Win.UltraWinGrid Namespace online documentation:
1. CancelableAutoSizeEditEventArgs : Event parameters used for events that take AutoSizeEdit as their arguments and are cancelable.
2. CancelableBandEventArgs: Event parameters used for the events that take Band object as its arguments.
3. CancelableCellEventArgs: Event parameters used for events that take a row and a column designating a cell (the cell at the intersection of the row and the column) as their argument and are cancelable.
4. CancelableDropDownEventArgs: Event parameters used for the BeforeDropDown event.
5. CancelableLogicalPrintPageEventArgs: Event parameters used for Logical Print Page event.
6. CancelablePrintEventArgs: Event parameters used for initialize print event, and before print event.
7. CancelablePrintPreviewEventArgs: Event parameters used for Initialize Print Preview event.
8. CancelableRowEventArgs: Event parameters used for the BeforeCellActivate event.