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

Refresh Parent - Load On Demand

7 Answers 118 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Orest
Top achievements
Rank 1
Orest asked on 21 Oct 2009, 07:01 PM

I need to do something similar to that you have in this example

http://demos.telerik.com/aspnet-ajax/tooltip/examples/loadondemand/defaultcs.aspx but imagine that in the control that embedded in a tooltip is an update control and I’m changing product name, so after I finished updating my fields I need to refresh my parent page. How do I do that? I’m using the same control tree similar to what you have in your example.

  1. Have a parent page (user control)
  2. Have a telerik:RadListBox that is bound and on ItemDataBound I add TargetControls collection
  3. On OnAjaxUpdate I instantiate my “Update User Control”.  I have “Save” button on it so when action is taken in “Update” control I need to refresh my Parent page with new info

7 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 23 Oct 2009, 09:07 AM
Hi Orest,

I already answered your other thread and for your convenience and for others who might have the same question I pasted my reply below:


There is no way to achieve what you want without using an additional update panel and this is not directly related to RadControls but to the way AJAX works. Let me explain in brief what is actually happenning in your case. The link button is inside the RadToolTip and since this is a LOD AJAX tooltip, this means that all teh tooltip content is in an update panel and this button is a trigger for updating this update panel. This means that when you click the button, you update only this part of the page which is inside the tooltip. In order to update another part of the page you should wrap it also in an update panel because this is how update panels work - if an update panel is updated, only this part of the page gets updated. This being said, the only possible solution is to also update the other part ofg the page you need by using another update panel.

I hope that my explanation is detailed enough and clear, let me know if you have additional questions.


Regards,
Svetlina
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
Orest
Top achievements
Rank 1
answered on 23 Oct 2009, 01:04 PM
I was able to make this work. I have my content that needs to be updated in a different Update panel. Add Event to my Control and subscribed for that event in the parent.
ctlProduct.ActionCommandClick += this.prodMenu_Click; 
 so when Save button is clicked event is raised by control and after parent receives is I change content and do UpdatePanel2.Update
0
Accepted
Svetlina Anati
Telerik team
answered on 26 Oct 2009, 09:17 AM
Hello Orest,

Indeed, your solution will also work but actually what it is doing is that it calls the Update() method of the update panel. Furthermore, if you have other custom code in the handler it will also get excecuted despite the menu item was not actually clicked which is not wanted in most cases. However, in case this works for you and  you prefer this solution you can stick to it.


Sincerely yours,
Svetlina
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
Francis Frank
Top achievements
Rank 1
answered on 25 Oct 2011, 03:26 PM
Please can someone help me 

I have a tooltip which contains a button
I want to refresh the parent page when i click on the button inside the tooltip
0
Marin Bratanov
Telerik team
answered on 26 Oct 2011, 09:48 AM
Hi Francis,

You can do this easily by using the client-side click handler of the button and calling window.location.reload(), for example:
<asp:Button ID="Button1" Text="reload page" OnClientClick="window.location.reload(); return false;" runat="server" />



Regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Francis Frank
Top achievements
Rank 1
answered on 28 Oct 2011, 02:40 PM
Thanks Marin,

Your quick response was so satisfying - I appreciate

But I need to do this after executing some server side codes
May I get a solution that works from code behind file?

Thanks Marin, Thanks Telerik Team
0
Marin Bratanov
Telerik team
answered on 28 Oct 2011, 04:12 PM
Hi Francis,

If you need the server-side functionality I advise that you inject a script from the server that will do the same as my previous example. An example how do to this is available in the following help article: http://www.telerik.com/help/aspnet-ajax/radwindow-troubleshooting-javascript-from-server-side.html. Please note the section related to AJAX - the usage of the ScriptManager's RegisterStartupScript() method. I propose this, as Reseponse.Redirect() cannot work with partial page updates, so you can redirect the browser only on the client in this case.


Kind regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
ToolTip
Asked by
Orest
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Orest
Top achievements
Rank 1
Francis Frank
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or