saravanan subramanian
Top achievements
Rank 1
saravanan subramanian
asked on 15 Jul 2009, 03:02 PM
Hi all,
How to view day view from month view when i click the particular day cell not (the date header) the full cell.
Please any one help me with sample code.
Thanks,
Saravanan.S
3 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 16 Jul 2009, 09:15 AM
Hi Saravanan,
Try the following code in order to show DayView on clicking the day cell in MonthView.
ASPX:
JavaScript:
C#:
-Shinu.
Try the following code in order to show DayView on clicking the day cell in MonthView.
ASPX:
| <telerik:RadScheduler ID="RadScheduler1" runat="server" DataSourceID="SqlDataSource2" OnClientTimeSlotClick="OnClientTimeSlotClick"> |
| </telerik:RadScheduler> |
JavaScript:
| <script type="text/javascript"> |
| function OnClientTimeSlotClick(sender, args) |
| { |
| __doPostBack("<%= RadScheduler1.UniqueID %>", "DateClicked:" + args.get_time().localeFormat('MM/dd/yyyy')); |
| } |
| </script> |
C#:
| protected override void RaisePostBackEvent(IPostBackEventHandler source, string eventArgument) |
| { |
| if (source == this.RadScheduler1 && eventArgument.IndexOf("DateClicked") != -1) |
| { |
| RadScheduler1.SelectedView = SchedulerViewType.DayView; |
| RadScheduler1.SelectedDate = Convert.ToDateTime(eventArgument.Split(':')[1]); |
| } |
| } |
-Shinu.
0
saravanan subramanian
Top achievements
Rank 1
answered on 16 Jul 2009, 11:07 AM
Hi shinu,
Thanks for your reply.
I have tried and its showing error message when i add the c# coding into my c# page. Can you able to post the sample app if you have anything? Please its very urgent.
Thanks,
Saravanan.S
0
Hi saravanan subramanian,
Here is an easier solution:
Greetings,
Veselin Vasilev
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.
Here is an easier solution:
| <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> |
| <script type="text/javascript"> |
| function onClientTimeSlotClick(sender, e) |
| { |
| var slot = e.get_time().format("yyyy/MM/dd"); |
| $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(slot); |
| } |
| </script> |
| </telerik:RadScriptBlock> |
| protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) |
| { |
| RadScheduler1.SelectedDate = Convert.ToDateTime(e.Argument); |
| RadScheduler1.SelectedView = Telerik.Web.UI.SchedulerViewType.DayView; |
| } |
Greetings,
Veselin Vasilev
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.