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

OnClientBeforeClose Event Only Fires On The First Window That Is Opened

1 Answer 90 Views
Window
This is a migrated thread and some comments may be shown as answers.
Tracy
Top achievements
Rank 1
Tracy asked on 26 Jan 2018, 09:39 PM

Hi,

 I have a RadWindowManager on a page where I have a function assigned to the OnClientBeforeClose event.

<telerik:RadWindowManager ID="rwmManager"  runat="server"  DestroyOnClose="true"   ReloadOnShow="true"   CenterIfModal="true"  OnClientClose="RefreshGrid" OnClientBeforeClose="ChangeAlert"  />

 

The problem I am having is that the OnClientBeforeClose event only fires the first time I open the window.  If I close the window and then re-open and then subsequently close the window, the OnClientBeforeClose event doesn't fire.

 

If I change the DestroyOnClose = "false" then the event will fire every time, but the previous window I opened gets cached and flashes on the screen before the new window is opened.

How can I make this work without setting the DestroyOnClose to false.

Thank You

Tracy

 

 

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 29 Jan 2018, 09:32 AM

Hello Tracy,

This probably stems from the presence of the AjaxControlToolkit in the project, as it overrides some MS AJAX methods related to event handling: https://docs.telerik.com/devtools/aspnet-ajax/controls/window/troubleshooting/common-issues#onclientclose-is-not-fired.

You can also make sure the old content is not seen by setting ShowContentDuringLoad to false.

Regards,

Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Window
Asked by
Tracy
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or