3 Answers, 1 is accepted
0
Hello Greg,
You can achieve this using RadAjaxManager as shown in this help topic:
http://www.telerik.com/help/aspnet-ajax/ajxaddajaxrequesttoclientevent.html
Here is a sample code:
ASPX
C#
Greetings,
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 achieve this using RadAjaxManager as shown in this help topic:
http://www.telerik.com/help/aspnet-ajax/ajxaddajaxrequesttoclientevent.html
Here is a sample code:
ASPX
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" |
| onajaxrequest="RadAjaxManager1_AjaxRequest"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadScheduler1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="RadScheduler1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadScheduler1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
| <script type="text/javascript"> |
| function OnClientTimeSlotClick(sender, eventArgs) { |
| var clickedDateTime = eventArgs.get_time().format('yyyy/MM/dd'); |
| $find("<%=RadAjaxManager1.ClientID %>").ajaxRequest(clickedDateTime); |
| } |
| </script> |
| </telerik:RadCodeBlock> |
| <telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="End" |
| OnClientTimeSlotClick="OnClientTimeSlotClick" |
C#
| protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) |
| { |
| RadScheduler1.SelectedDate = DateTime.Parse(e.Argument); |
| RadScheduler1.SelectedView = SchedulerViewType.DayView; |
| } |
Greetings,
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
Andrew
Top achievements
Rank 1
answered on 16 Sep 2009, 02:51 PM
Hi
I tried to add the required code into my page, yet for some reason the javascript is not being fired as i get no alert when clicking. Do you have any ideas as to why this would not fire? I have been about to access other javascript functions ( OnClientAppointmentEditing and OnClientAppointmentMoveStart) successfully on the same scheduler/calendar this one just doesnt seem, to get called at all. Is there a server side function need to call/setup?
Thanks
I tried to add the required code into my page, yet for some reason the javascript is not being fired as i get no alert when clicking. Do you have any ideas as to why this would not fire? I have been about to access other javascript functions ( OnClientAppointmentEditing and OnClientAppointmentMoveStart) successfully on the same scheduler/calendar this one just doesnt seem, to get called at all. Is there a server side function need to call/setup?
Thanks
0
Hello Greg,
That's strange. Can you isolate the problem in a simple working demo and send it to us for further testing via a support ticket?
Regards,
Peter
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.
That's strange. Can you isolate the problem in a simple working demo and send it to us for further testing via a support ticket?
Regards,
Peter
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.