This is a migrated thread and some comments may be shown as answers.
Open Window from Code Behind - No refresh?
6 Answers 100 Views
This is a migrated thread and some comments may be shown as answers.
Paul Aikman
Top achievements
Rank 1
Paul Aikman asked on 09 Dec 2009, 01:39 PM
Hi,

Not sure if this is possible - I've been able to open a window from code-behind, but haven't been able to stop a full page refresh occurring. 

Is it possible to open a window from code-behind without the page refresh? If not, are there any other ways around the following:

- There are two user controls on a page, one is the control, the other is a filter for the control.
- When a user clicks "view filters", an event should be raised to the filter controls to show the filters (a rad window).
- When the user clicks "ok", the filters should be applied and the window closed.

Controls have been split out because I'm following an MVP pattern in ASP.Net.

Thanks,

Paul

6 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 14 Dec 2009, 10:36 AM
Hello Paul,

 If you need to open a RadWindow from the server and you do not want to refresh the whole page you can use the AJAX approach described in this code library.

I hope this helps.

Best wishes,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
DvdBrink
Top achievements
Rank 1
answered on 15 Dec 2009, 11:00 AM
I'm having almost the same problem.

De RadWindow opens but when i press a button which is placed in the window it refreshes the whole page.
The RadWindow itself is in a ASP.NET AJAX UpdatePanel.

I don't use a RadAjaxManager or something, only normal ASP.NET controls with a RadWindow.
Is there a solution for this problem?

0
Georgi Tunev
Telerik team
answered on 15 Dec 2009, 11:09 AM
Hello Dick,

If the button is in the content page and when you click it you reload the content page, this behavior is expected. RadWindow's content is a separate document (the control is basically an IFRAME), different from the parent one and if your update panel is in the main page, it will not affect the controls in the content one. If you want to ajaxify the content page, you should add a panel there as well.

If this is not the case, please open a support ticket and send a sample project that shows your exact setup and the problem itself so we could check it.



Sincerely yours,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
DvdBrink
Top achievements
Rank 1
answered on 15 Dec 2009, 12:04 PM
I dont use the NavigateUrl property but the ContentContainer from RadWindow, so it doesn't generate an IFrame.

I can't open a support ticket, because we are testing the package and didn't buy it.

This is my setup now:

I have a page with a button. When the button is clicked, it add's a RadWindow on an UpdatePanel and opens the window.
The window has another button and when I press this button, it reloads the whole page.

So it doesn't update the Window itself, but it recreates the whole page.

edit: I know recreation is needed in ASP.NET, i tried to say that it sends the whole page back to the client.



0
Accepted
Georgi Tunev
Telerik team
answered on 16 Dec 2009, 11:04 AM
Hello Dick,

You need to ajaxify the content container - e.g. to add an UpdatePanel there as well.

If you still experience problems, your trial account gives you a 60 days access to the support ticketing system, so you could send us a small sample project that we could check.

Sincerely yours,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
DvdBrink
Top achievements
Rank 1
answered on 16 Dec 2009, 04:39 PM
Thanks for helping me out with this problem.

When I created a small example it was working correctly. My mistake was updating the wrong panel, which caused this weird behavior.
Asked by
Paul Aikman
Top achievements
Rank 1
Answers by
Fiko
Telerik team
DvdBrink
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or