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

Loading external URL into a RadPane (with AJAX)

3 Answers 191 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Ville
Top achievements
Rank 1
Ville asked on 17 Jun 2009, 07:02 PM
Hello all,

I am trying to update the ContentUrl of a RadPane with ajax, however without any success yet. I found an article that mentioned that if I want to ajaxify a RadPane, I should wrap its contents inside a normal asp:panel or similar. However, this doesn't allow me to update the ContentUrl property. The RadPane should host a XBAP application. How this kind of behaviour could be implemented?

Any help is appreciated!

Best regards,
Ville

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 19 Jun 2009, 01:59 PM
Hi Ville,

I am not sure about your exact scenario and why you need to change the content url through AJAX - it is better to do so on the client through javascript and this will prevent not only a postback but also a trip to the server.

You have correctly noticed that when you want to update the content of a RadPane with AJAX you should wrap it in a panel and update the panel. However, this is teh case when you have internal content in teh pane. When you specify a ContentUrl, the RadPane creates an IFRAME element in which to load the external page in it and that is why the panel solution will not work. If you want to keep your setup, I suggest to remove the panel and to try updating the whole splitter.

On a side note, I recommend to use the RadPane's client-side API to get the desired result - all you should do is to reference the particular RadPane and to pass the desired url to its set_contentUrl method which is listed below:

http://www.telerik.com/help/aspnet-ajax/splitter_clientsideradpane.html 

Best wishes,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Ville
Top achievements
Rank 1
answered on 19 Jun 2009, 02:08 PM
Hi Svetlina,

Thanks for your prompt reply and explanation.

The reason why I am using AJAX to update the radPane is because the client does not know the exact URL where to go before checking the database for details. The setup is a combination of RadSplitter and RadScheduler, after clicking the appointment I should update another content to the RadPane below the scheduler.

However, a quick (and a bit dirty) workaround could be redirecting the user to a static URL (and maybe a generic handler) that redirects the user to the correct and final url.

Best regards,
Ville
0
Svetlina Anati
Telerik team
answered on 19 Jun 2009, 04:11 PM
Hi Ville,

Yes, this solution should work. Another possibility is to define a javascript function in the markup which takes the url as an argument and sets it to teh RadPane. After you get the url on the server, you can execute the javascript from the server in one of the standard manners of executing scripts from the server in ASP.NET - a blog post about this is available below:

http://blogs.telerik.com/supportdept/posts/09-05-05/executing_javascript_function_from_server-side_code.aspx

Regards,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Splitter
Asked by
Ville
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Ville
Top achievements
Rank 1
Share this question
or