Click or drag to resize

DataWindow.Cancel Method (Typed)

X#
Discard all information entered in this data window and close the window.

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VOGUIClasses (in XSharp.VOGUIClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD Cancel() AS LOGIC
Request Example View Source

Return Value

Type: Logic
TRUE if successful; otherwise, FALSE.
Remarks
The "cancel" operation is very clear and easily understood and might be profitably used on data windows when they are created as MDI children (unconventional or not). Note that a user might be unclear on exactly what transactions are discarded. For example, if several records have been modified, the default implementation of DataWindow:Cancel() discards changes only to the current record. You might want to label the button or menu command something else or provide a more comprehensive implementation.
Tip Tip
DataWindow:Cancel() disconnects itself from the data server using DataServer:UnregisterClient() and tells the server that it can close itself if it has no other registered clients. Explicitly forcing the server to close from a window is not recommended, since this can create future problems. Modifications to the application can attach other clients to the server, and any one window should not disable other windows.
See Also