Abhishek Dixit
Top achievements
Rank 1
Abhishek Dixit
asked on 14 May 2009, 11:44 AM
Hi Telerik Team,
I have a case where I have an IFrame (having src set to PageA.aspx) inside a RadDock which is launched from the RadScheduler control inside PageB.aspx. Now I want that when a button from my Iframe's page (PageA.aspx) is clicked, my RadDock should get closed.
But RadDock seems to close only when I click the Submit/Cancel button which I have defined in the RadDock in PageB.aspx.
So I wired an event from PageA.aspx and when user clicks the button from that page, I set RadDock.Closed to true in my event handler in PageB.aspx. I debugged my code to ensure this line does gets executed. Still RadDock stays open.
Please advice where I may be mssing. I understand this is not a standard application scenario.
Regards,
Abhishek
I have a case where I have an IFrame (having src set to PageA.aspx) inside a RadDock which is launched from the RadScheduler control inside PageB.aspx. Now I want that when a button from my Iframe's page (PageA.aspx) is clicked, my RadDock should get closed.
But RadDock seems to close only when I click the Submit/Cancel button which I have defined in the RadDock in PageB.aspx.
So I wired an event from PageA.aspx and when user clicks the button from that page, I set RadDock.Closed to true in my event handler in PageB.aspx. I debugged my code to ensure this line does gets executed. Still RadDock stays open.
Please advice where I may be mssing. I understand this is not a standard application scenario.
Regards,
Abhishek
10 Answers, 1 is accepted
0
Accepted
Hi Abhishek Dixit,
I already answered your question in the ticket you sent. Here is a copy of my answer:
The problem in the project you sent is that the parent page(ParentPage.aspx) is not refreshed once you click the close button.
The only one way to close a RadDock when you have an iframe in it is to use a JavaScript.
You should get a reference to the RadDock in ParentPage.aspx, e.g.
After that you should close it with RadDock.set_closed(true) method from the Child page(childPage.aspx),e.g.
P.S. If you want to have an iframe in RadDock, my suggestion is to use the RadWindow control which is created for such scenarios and it has integrated modality.
Kind regards,
Petio Petkov
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.
I already answered your question in the ticket you sent. Here is a copy of my answer:
The problem in the project you sent is that the parent page(ParentPage.aspx) is not refreshed once you click the close button.
The only one way to close a RadDock when you have an iframe in it is to use a JavaScript.
You should get a reference to the RadDock in ParentPage.aspx, e.g.
| var openedDock; |
| function openForm() { |
| var dock = $find("<%= RadDock1.ClientID %>"); |
| openedDock = dock; |
| .......................... |
| <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> |
| <script type="text/javascript"> |
| function CloseDock() { |
| var parentDock = window.top.window.openedDock; |
| parentDock.set_closed(true); |
| } |
| </script> |
| <asp:UpdatePanel runat="server" ID="UpdatePanelsch"> |
| <ContentTemplate> |
| <asp:Label runat="server" Text="Child Page"></asp:Label> |
| <input type="button" value="closeWithJavaScript" onclick="CloseDock()" /> |
| </ContentTemplate> |
| </asp:UpdatePanel> |
| </asp:Content> |
P.S. If you want to have an iframe in RadDock, my suggestion is to use the RadWindow control which is created for such scenarios and it has integrated modality.
Kind regards,
Petio Petkov
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
Abhishek Dixit
Top achievements
Rank 1
answered on 20 May 2009, 10:06 AM
Hello Petio Petkov,
Thanks a million! Your solution worked like a charm.
And I will surely try to use the RadWindow control in my project some time later.
One thing more, I also want to do a RadScheduler.Rebind() at the close event, so how can I call this before closing the RadDock.
Thanks a lot again. I also want to update the Support ticket, but somehow cant see the "Reply" button there.
Regards,
Abhishek
Thanks a million! Your solution worked like a charm.
And I will surely try to use the RadWindow control in my project some time later.
One thing more, I also want to do a RadScheduler.Rebind() at the close event, so how can I call this before closing the RadDock.
Thanks a lot again. I also want to update the Support ticket, but somehow cant see the "Reply" button there.
Regards,
Abhishek
0
Abhishek Dixit
Top achievements
Rank 1
answered on 22 May 2009, 10:47 AM
Hello Petio Petkov,
Besides my last question as to how to rebind radscheduler once raddock is closed, I have another question - where can I get the working example of how to launch RadWindow from my scheduler control. The sample project from Telerik doesn't seem to have such an example. I want to give it a try since you are saying that it would make more sense to use RadWindow than RadDock in my scenario.
Waiting for your response,
Abhishek.
Besides my last question as to how to rebind radscheduler once raddock is closed, I have another question - where can I get the working example of how to launch RadWindow from my scheduler control. The sample project from Telerik doesn't seem to have such an example. I want to give it a try since you are saying that it would make more sense to use RadWindow than RadDock in my scenario.
Waiting for your response,
Abhishek.
0
Hi Abhishek,
You can find such a demo in the Q1 2008 release
Telerik.Web.UI_2008_1_619\Live Demos\Scheduler\Examples\RadWindow
I have attached the demo files for your convenience.
Best wishes,
Peter
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.
You can find such a demo in the Q1 2008 release
Telerik.Web.UI_2008_1_619\Live Demos\Scheduler\Examples\RadWindow
I have attached the demo files for your convenience.
Best wishes,
Peter
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
Abhishek Dixit
Top achievements
Rank 1
answered on 26 May 2009, 06:48 AM
Hello Peter,
Thanks a lot for the demo app - I will try it out today.
Also can you help as to how can I do a scheduler rebind once i close my raddock through the javascript method descibed in this post.
Regards,
Abhishek
Thanks a lot for the demo app - I will try it out today.
Also can you help as to how can I do a scheduler rebind once i close my raddock through the javascript method descibed in this post.
Regards,
Abhishek
0
Hi Abhishek,
You can use RadAjaxManager and call Rebind() for RadScheduler in AjaxRequest as shown in this help topic:
http://www.telerik.com/help/aspnet-ajax/ajxaddajaxrequesttoclientevent.html
Best wishes,
Peter
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.
You can use RadAjaxManager and call Rebind() for RadScheduler in AjaxRequest as shown in this help topic:
http://www.telerik.com/help/aspnet-ajax/ajxaddajaxrequesttoclientevent.html
Best wishes,
Peter
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
Abhishek Dixit
Top achievements
Rank 1
answered on 28 May 2009, 07:16 AM
Hello Peter,
I saw the RadAjaxManager example but cant figure out how it will work in my example mentioned in this post.
So I have now a Close button in PageA.aspx which calls PageB.aspx RadDock to close using JavaScript. This has been achieved by Telerik's help. The code for this was
Now how can I ajaxify or do a Rebind() for RadScheduler after this.
Please guide me on this.
Waiting eagerly for your reposnse,
Abhishek
I saw the RadAjaxManager example but cant figure out how it will work in my example mentioned in this post.
So I have now a Close button in PageA.aspx which calls PageB.aspx RadDock to close using JavaScript. This has been achieved by Telerik's help. The code for this was
| var parentDock = window.top.window.openedDock; |
| parentDock.set_closed(true); |
Now how can I ajaxify or do a Rebind() for RadScheduler after this.
Please guide me on this.
Waiting eagerly for your reposnse,
Abhishek
0
Hello Abhishek Dixit,
Peter's suggestion is to use the RadAjaxManager to make an ajax request after calling parentDock.set_closed(true); You should make an ajaxRequest with a specific argument and then handle it on the server. For example:
$find("<%=RadAjaxManager1.ClientID %>").ajaxRequest('rebindScheduler');
And then on the server handle the AjaxRequest event of the RadAjaxManager:
protected void RadAjaxManager1_AjaxRequest( object sender, AjaxRequestEventArgs e)
{
if (e.Argument == 'rebindScheduler')
{
RadScheduler1.Rebind();
}
}
Kind regards,
Dimitar Milushev
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.
Peter's suggestion is to use the RadAjaxManager to make an ajax request after calling parentDock.set_closed(true); You should make an ajaxRequest with a specific argument and then handle it on the server. For example:
$find("<%=RadAjaxManager1.ClientID %>").ajaxRequest('rebindScheduler');
And then on the server handle the AjaxRequest event of the RadAjaxManager:
protected void RadAjaxManager1_AjaxRequest( object sender, AjaxRequestEventArgs e)
{
if (e.Argument == 'rebindScheduler')
{
RadScheduler1.Rebind();
}
}
Kind regards,
Dimitar Milushev
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
Abhishek Dixit
Top achievements
Rank 1
answered on 02 Jun 2009, 06:39 AM
Hello Dimitar Milushev,
Thanks for the reply. Probably I am not still getting it or maybe I havent explained the problem in detail.
In my ChildPage.aspx I gather the info for an appointment and then on Close call the Raddock.close using the global script variable for the RadDock (parentdock).
But now since both RadScheduler and RadAjaxManager are on the ParentPage.aspx, I am not able to call RadAjaxManager on the ChildPage.aspx. Making the global javascript variable for RadAjaxManager also doesnt seem to work.
Could you please update the sample project I have attached in this post as to how to do a Rebind() as that would be just great.
Thanks,
Abhishek
Thanks for the reply. Probably I am not still getting it or maybe I havent explained the problem in detail.
In my ChildPage.aspx I gather the info for an appointment and then on Close call the Raddock.close using the global script variable for the RadDock (parentdock).
But now since both RadScheduler and RadAjaxManager are on the ParentPage.aspx, I am not able to call RadAjaxManager on the ChildPage.aspx. Making the global javascript variable for RadAjaxManager also doesnt seem to work.
Could you please update the sample project I have attached in this post as to how to do a Rebind() as that would be just great.
Thanks,
Abhishek
0
Hello Abhishek,
I think you forgot to attach the sample project. Once you attach it, I will try to modify it to do what you want it to.
Sincerely yours,
Dimitar Milushev
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.
I think you forgot to attach the sample project. Once you attach it, I will try to modify it to do what you want it to.
Sincerely yours,
Dimitar Milushev
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.