This is a migrated thread and some comments may be shown as answers.

[Solved] OnClientClose event args

2 Answers 155 Views
Window
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 04 Apr 2008, 12:15 PM
Hi,

Can you tell me what eventArgs are available in the OnClientClose event? Specifically I'd like to know if it is possible to tell how the dialog has been closed (i.e. through code or by clicking the X).

Thanks

John Rhodes

2 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 07 Apr 2008, 10:31 AM
Hello John,

The second eventArgs argument in the OnClientClose function is not used. You can use the first argument only which gives you a reference to the closed RadWindow.

As for the task that you wish to accomplish, what I can suggest is to declare a global variable and set its value if you close the RadWindow from code. Then in the OnClientClose function you can check that variable's value and if it is changed - then the RadWindow was closed from a closing script. If the value is not changed, this would mean that the user has closed the window by clicking on the X button (make sure that you reset the value after checking it).



Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
John
Top achievements
Rank 1
answered on 07 Apr 2008, 11:29 AM
OK Thanks. That was my "fallback" solution :-)
Tags
Window
Asked by
John
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
John
Top achievements
Rank 1
Share this question
or