I noticed that when I click the Cancel button or the 'X' on a radConfirm dialog box, the radConfirm window closes without doing a postback of the original page. I would like to duplicate this with my own radWindow. If the user is canceling, there's no need for the postback.
My Cancel button calls the below CloseOnReload function (the same one I've seen throughout this site for closing a radWindow):
Is there any way to stop the postback when the user clicks the Cancel button or the 'X'?
6 Answers, 1 is accepted
As far as I know the page will not reload when closing the window unless you added code for refresh. Could you check whether you added an code in OnClientClose() of radwindow which might cause the issue.
Could you provide some more information about the code that you tried if this does not help?
The entire HTML for my page is as follows:
As you can see, I call the CloseOnReload() function when the btnCancel button is clicked. The radWindow closes, but the parent page reloads and "jumps". I tried this with a regular HTML button as well with no change in behavior.
Incidentally, I don't really care if the parent page refreshes. I just want to get rid of the "jumping" so that it APPEARS as though the parent page is not refreshing.
The entire parent page is contained within a radAjaxPanel.
I don't know if it's relevant or not, but there is no code-behind click event behind the btnCancel button above.
Just an fyi - When I view this thread from my subscriptions page, it says there are 4 posts and 32 visits, with the last post being from a Telerik Admin about 11 hours ago (not including the post I am creating right now of course). However, when I view the details of the thread I only see 3 posts - the last one being from me.
So, I am still waiting on a response.
You posted the code of the content page, which as far as I see is OK - the button simply closes the RadWindow. We don't know however what is happening in the parent page - I believe that is why Shinu asked if you execute any code in the OnClientClose function. Could you paste the code of the parent page as well?
Just asking me for the other info jogged my memory and answered my question.
I am indeed calling a function that reloads when the radWindow closes.
I'm facing the same issue just like you. can u paste the code to avoid reloading of page after radwindow is closed.