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

From timeslot click in monthview to dayview

1 Answer 55 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
PÄR-OSKAR HOLMGREN
Top achievements
Rank 1
PÄR-OSKAR HOLMGREN asked on 07 Jul 2008, 10:25 AM
Hi

One more question. When I click on a time slot in moth view, how do I get the sceduler to display the all day view i.e. the same view as shown in dayview or when clicking the "show more" link when having more than  the stated number of appointments on a day.  Right now I get to the insert appointment form when performing the same action.

/kind regards

Per-Oskar Holmgren
Inka Interactive

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 07 Jul 2008, 02:58 PM
Hi PÄR-OSKAR HOLMGREN,

Thank you for this question.

Please try the following:

<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 OnClientTimeSlotClickHandler(sender, eventArgs)  
    {        
        if(sender.get_selectedView() == Telerik.Web.UI.SchedulerViewType.MonthView)  
        {             
            $find("<%=RadAjaxManager1.ClientID %>").ajaxRequest(eventArgs.get_time().format("MM/dd/yyyy"));  
        }  
    }      
    </script> 
    </telerik:RadCodeBlock> 
    <telerik:RadScheduler ID="RadScheduler1" runat="server" 
    OnClientTimeSlotClick="OnClientTimeSlotClickHandler" 


protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)  
    {  
        DateTime dt = new DateTime();  
        dt = DateTime.Parse(e.Argument);  
        RadScheduler1.SelectedView = Telerik.Web.UI.SchedulerViewType.DayView;  
        RadScheduler1.SelectedDate = dt;  
    } 


Kind regards,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
PÄR-OSKAR HOLMGREN
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or