The OnClientBeforeClose event of the RadWindow control fires when it is about to close. This event can be cancelled (see Example 1) to prevent the closing operation (and the OnClientClose event from firing). The close operation can be initiated from the user by clicking or tapping on the manual close button (X) in the top right-hand side corner of the title bar, or by the developer via calling the
close(optionalArguments) client-side method of the control.
You can also use this event to ask the user to confirm whether the dialog should close(e.g., if there is no data supplied as an argument).
The event handler receives the following arguments:
The RadWindow object that fired the event.
An event arguments object that exposes the following methods:
|get_argument||object||This is the argument passed to the
|get_cancel||boolean||Gets a value indicating whether the event is going to be cancelled.|
|set_cancel||boolean||Sets a value indicating whether the event is going to be cancelled.Pass true to cancel the event.The method takes the following arguments: boolean—a value that indicates whether the event is to be cancelled.|