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

Cutting Off Multi Day Appointments

5 Answers 89 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 11 Dec 2009, 09:56 PM
I'm running version 2009.2.826.20 of the scheduler.  For some reason my multiday appointment is getting cut of at 5:00 pm.  I tried changing the WorkDayEndTime and the DayEndTime but it still cuts it off.  I tried changeing thes same properties in the DayView but to no effect.  Any Idea's
<%@ Page Language="C#" ValidateRequest="false" AutoEventWireup="false" CodeBehind="Scheduler.aspx.cs" Inherits="crm.calendar.Scheduler.Scheduler" MasterPageFile="~/Intranet.Master" %> 
<%@ Register TagPrefix="rad" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
 
<asp:Content ID="Content1" ContentPlaceHolderID="MPTitle" runat="server">  
    Scheduler  
      
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="MPCaption" runat="server">  
    Scheduler  
</asp:Content> 
<asp:Content ID="Content3" ContentPlaceHolderID="MPContent" runat="server">   
    <script type="text/javascript">  
                var selectedAppointment = null;  
                var contextMenuSlot = null;  
                  
                function checkResourceMenuItem(menu, appointment)  
                {  
                    var calendar = appointment.get_resources().getResourcesByType("Calendar").getResource(0);  
                    if (!calendar)  
                        return;  
                          
                    var categorizeItem = menu.findItemByText("Categorize");  
                    //Traverse all menu items below "Categorize"  
                    for (var i = 0; i < categorizeItem.get_items().get_count(); i++)  
                    {  
                        var item = categorizeItem.get_items().getItem(i);  
                        if (item.get_value() == calendar.get_key())  
                        {  
                            //The item corresponds to the current "Calendar" - the Value of the item stores the Key of the resource  
                            item.set_imageUrl("Images/checked.gif");  
                        }  
                        else  
                        {  
                            item.set_imageUrl("");  
                        }  
                    }  
                }  
                  
                //Called when the user right-clicks an appointment  
                function appointmentContextMenu(sender, eventArgs)  
                {  
                    var menu = $find("<%= SchedulerAppointmentContextMenu.ClientID %>");  
                    selectedAppointment = eventArgs.get_appointment();  
                    checkResourceMenuItem(menu, selectedAppointment);  
                    menu.show(eventArgs.get_domEvent());  
                }  
              
                //Called when the user clicks an item from the appointment context menu  
                function appointmentContextMenuItemClicked(sender, eventArgs)  
                {  
                    if (!selectedAppointment)  
                        return;  
                      
                    sender.hide();  
                      
                    var clickedItem = eventArgs.get_item();  
                    var text = clickedItem.get_text();  
                    var scheduler = $find("<%= rsSecheduler.ClientID %>");  
                      
                    if (text == "Categorize")  
                    {  
                        //Do nothing if the user clicked the "Categorize" menu item  
                        return;  
                    }  
                      
                    if (text == "Delete")  
                    {  
                        scheduler.deleteAppointment(selectedAppointment, true);  
                    }  
                    else if (text == "Edit")  
                    {  
                        scheduler.showInlineEditForm(selectedAppointment);  
                    }  
                    else if (clickedItem.get_parent().get_text() == "Categorize")  
                    {  
                        //The user clicked the item corresponding to the "Calendar" resource to which the appointment is assigned  
                        if (clickedItem.get_imageUrl())  
                            return;  
                          
                        //Clear all resources  
                        selectedAppointment.get_resources().clear();  
                        //Find the resource corresponding to the clicked item  
                        var calendar = scheduler.get_resources().getResourceByTypeAndKey("Calendar", clickedItem.get_value());  
                        //Add it to the appointment resources collection  
                        selectedAppointment.get_resources().add(calendar);  
                        //Update the appointment  
                        scheduler.updateAppointment(selectedAppointment);  
                    }  
                }  
                //Called when the user right-clicks empty time slot  
                function timeSlotContextMenu(sender, eventArgs)  
                {  
                    var menu = $find("<%= SchedulerTimeSlotContextMenu.ClientID %>");  
                    contextMenuSlot = eventArgs.get_targetSlot();  
                    menu.show(eventArgs.get_domEvent());  
                }  
                  
                //Called when the user clicks an item from the time slot context menu  
                function timeSlotContextMenuItemClicked(sender, eventArgs)  
                {  
                    sender.hide();  
                      
                    var text = eventArgs.get_item().get_text();  
                    var scheduler = $find("<%= rsSecheduler.ClientID %>");  
                      
                    if (text == "New Appointment")  
                    {  
                        scheduler.showInsertFormAt(contextMenuSlot);  
                    }  
                    else if (text == "New All Day Event")  
                    {  
                        scheduler.showAllDayInlineInsertForm(contextMenuSlot.get_startTime());  
                    }  
                    else if (text == "New Recurring Appointment")  
                    {  
                        scheduler.showAdvancedInsertForm(contextMenuSlot.get_startTime());  
                    }  
                    else if (text == "New Recurring Event")  
                    {  
                        scheduler.showAllDayAdvancedInsertForm(contextMenuSlot.get_startTime());  
                    }  
                }  
                  
                function SwitchValues()  
                {  
                    SwitchTextBoxValue("_ctl0_MPContent_rsSecheduler_Form_txtTaskTextNew", "<%= hfTaskNotes.ClientID %>" );  
                    SwitchTextBoxValue("_ctl0_MPContent_rsSecheduler_Form_rdpStartDate", "<%= hfStartDate.ClientID %>");  
                    SwitchTextBoxValue("_ctl0_MPContent_rsSecheduler_Form_rtpStartTime", "<%= hfStartTime.ClientID %>");  
                    SwitchTextBoxValue("_ctl0_MPContent_rsSecheduler_Form_rdpEndDate","<%= hfEndDate.ClientID %>");  
                    SwitchTextBoxValue("_ctl0_MPContent_rsSecheduler_Form_rtpEndTime","<%= hfEndTime.ClientID %>");  
                    SwitchTextBoxValue("_ctl0_MPContent_rsSecheduler_Form_ddlAssignedTo","<%= hfAssignedTo.ClientID %>");  
                    SwitchTextBoxValue("_ctl0_MPContent_rsSecheduler_Form_ddlTypes","<%= hfType.ClientID %>");  
                }  
                  
                function SwitchTextBoxValue(txtSource, hfDestination)  
                {  
                    var txtSourceControl = document.getElementById(txtSource);  
                    var hfDestinationControl = document.getElementById(hfDestination);  
                      
                    if(txtSourceControl != null && hfDestinationControl != null)  
                    {  
                        //alert(txtSourceControl.value);  
                        hfDestinationControl.value = txtSourceControl.value;  
                        //alert(hfDestinationControl.value);  
                    }  
                }  
            </script> 
              
    <asp:HiddenField ID="hfTaskNotes" runat="server" /> 
    <asp:HiddenField ID="hfStartDate" runat="server" /> 
    <asp:HiddenField ID="hfStartTime" runat="server" /> 
    <asp:HiddenField ID="hfEndDate" runat="server" /> 
    <asp:HiddenField ID="hfEndTime" runat="server" /> 
    <asp:HiddenField ID="hfAssignedTo" runat="server" /> 
    <asp:HiddenField ID="hfType" runat="server" /> 
 
    <rad:RadScheduler   ID="rsSecheduler" OverflowBehavior="Scroll" ColumnWidth="100px" 
                        AdvancedForm-Enabled="false" MonthView-GroupingDirection="Vertical" 
                         WeekView-GroupingDirection="Vertical" TimelineView-GroupingDirection="vertical" 
                        OnClientAppointmentContextMenu="appointmentContextMenu"   
                        OnClientTimeSlotContextMenu="timeSlotContextMenu"   
                        runat="server"  DayStartTime="7:00" DayEndTime="18:00" 
                        WorkDayStartTime="7:00" WorkDayEndTime="18:00" 
                        DataEndField="EndDate" ShowAllDayRow = "false" 
                        DataStartField="DueDate" ShowFooter="false" 
                        DataKeyField="TaskID" MinimumInlineFormWidth=370 
                        DataSubjectField="TaskNote" 
                        AdvancedForm-Modal="true" HoursPanelTimeFormat="htt" ValidationGroup="rsSecheduler" 
                         RowHeight="60px" 
    > 
        <InlineInsertTemplate> 
            <table> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>Start Date:</b> 
                    </td> 
                    <td> 
                        <rad:RadDatePicker ID="rdpStartDate" runat="server" ></rad:RadDatePicker> 
                    </td> 
                    <td> 
                        <rad:RadTimePicker ID="rtpStartTime" runat="server" MaxDate="7:00 pm" MinDate="7:00 am"></rad:RadTimePicker> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>End Date:</b> 
                    </td> 
                    <td> 
                        <rad:RadDatePicker ID="rdpEndDate" runat="server" ></rad:RadDatePicker> 
                    </td> 
                    <td> 
                        <rad:RadTimePicker ID="rtpEndTime" runat="server" MaxDate="7:00 pm" MinDate="7:00 am"></rad:RadTimePicker> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>Assigned To:</b> 
                    </td> 
                    <td colspan="2">  
                        <asp:DropDownList ID="ddlAssignedTo" DataTextField="AMName" DataValueField="UserID" runat="server"></asp:DropDownList> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>Type:</b> 
                    </td> 
                    <td  colspan="2">  
                        <asp:DropDownList ID="ddlTypes" DataValueField="Value" DataTextField="Text" runat="server">  
     <%--                       <asp:ListItem value="OT">Other</asp:ListItem> 
                            <asp:ListItem value="CA">Call</asp:ListItem> 
                            <asp:ListItem value="EM">Email</asp:ListItem> 
                            <asp:ListItem value="MA">Mail</asp:ListItem> 
                            <asp:ListItem value="ME">Meeting</asp:ListItem>--%> 
                        </asp:DropDownList> 
                    </td> 
                </tr> 
                   <td colspan="4">  
                        <table> 
                            <tr> 
                                <td style="width:29%"  align="right" valign="top">  
                                    <b>Related To:</b> 
                                </td> 
                                <td style="width:45%">  
                                    <asp:LinkButton ID="lbRelatedTo" runat="server"></asp:LinkButton> 
                                </td> 
                                <td align="right" valign="top">  
                                    <b>Created By:</b> 
                                </td> 
                                <td> 
                                    <asp:Label ID="lblCreatedBy" runat="server"></asp:Label> 
                                </td> 
                            </tr> 
                        </table> 
                    </td> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>Task Text:</b> 
                    </td> 
                    <td colspan="2">  
                        <asp:textbox id="txtTaskTextNew" runat="server" TextMode="MultiLine" Height="160" CssClass="simple_textarea" Width="100%"></asp:textbox> 
                    </td> 
                </tr> 
            </table> 
            <table> 
                <tr> 
                    <td> 
                        <asp:Button ID="butAddAppointment" Text="Add" CommandName="Insert" OnClientClick="SwitchValues()" runat="server" /> 
                    </td> 
                    <td> 
                        <asp:Button ID="butCancel" Text="Cancel"  CommandName="Cancel" runat="server" /> 
                    </td> 
                </tr> 
            </table> 
        </InlineInsertTemplate> 
         
       <InlineEditTemplate> 
            <table> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>Start Date:</b> 
                    </td> 
                    <td> 
                        <rad:RadDatePicker ID="rdpStartDate" runat="server" ></rad:RadDatePicker> 
                    </td> 
                    <td> 
                        <rad:RadTimePicker ID="rtpStartTime" runat="server" MaxDate="7:00 pm" MinDate="7:00 am"></rad:RadTimePicker> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>End Date:</b> 
                    </td> 
                    <td> 
                        <rad:RadDatePicker ID="rdpEndDate" runat="server" ></rad:RadDatePicker> 
                    </td> 
                    <td> 
                        <rad:RadTimePicker ID="rtpEndTime" runat="server" MaxDate="7:00 pm" MinDate="7:00 am"></rad:RadTimePicker> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>Assigned To:</b> 
                    </td> 
                    <td colspan="2">  
                        <asp:DropDownList ID="ddlAssignedTo" DataTextField="AMName" DataValueField="UserID" runat="server"></asp:DropDownList> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>Type:</b> 
                    </td> 
                    <td  colspan="2">  
                        <asp:DropDownList ID="ddlTypes"  DataValueField="Value" DataTextField="Text"  runat="server">  
     <%--                       <asp:ListItem value="OT">Other</asp:ListItem> 
                            <asp:ListItem value="CA">Call</asp:ListItem> 
                            <asp:ListItem value="EM">Email</asp:ListItem> 
                            <asp:ListItem value="MA">Mail</asp:ListItem> 
                            <asp:ListItem value="ME">Meeting</asp:ListItem>--%> 
                        </asp:DropDownList> 
                    </td> 
                </tr> 
                <tr> 
                    <td colspan="4">  
                        <table> 
                            <tr> 
                                <td style="width:29%"  align="right" valign="top">  
                                    <b>Related To:</b> 
                                </td> 
                                <td style="width:45%">  
                                    <asp:LinkButton ID="lbRelatedTo" runat="server"></asp:LinkButton> 
                                </td> 
                                <td align="right" valign="top">  
                                    <b>Created By:</b> 
                                </td> 
                                <td> 
                                    <asp:Label ID="lblCreatedBy" runat="server"></asp:Label> 
                                </td> 
                            </tr> 
                        </table> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>Task Text:</b> 
                    </td> 
                    <td colspan="2">  
                        <asp:textbox id="txtTaskTextNew" runat="server" TextMode="MultiLine" Height="160" CssClass="simple_textarea" Width="100%"></asp:textbox> 
                    </td> 
                </tr> 
            </table> 
              
            <table> 
                <tr> 
                    <td> 
                        <asp:Button ID="butUpdateAppointment" Text="Update" CommandName="Update" OnClientClick="SwitchValues()" runat="server" /> 
                    </td> 
                    <td> 
                        <asp:Button ID="butCancel" Text="Cancel"  CommandName="Cancel" runat="server" /> 
                    </td> 
                </tr> 
            </table> 
        </InlineEditTemplate> 
          
        <AppointmentTemplate> 
            <div style="overflow:auto; height:60px; width:100%; height:100%;">  
                <div class="rsAptSubject">  
                    <asp:Label ID="lblAssignedTo" runat="server"></asp:Label> 
                </div> 
                <br /> 
                <%# (Eval("Subject") as string).Replace("\n", "<br />") %> 
            </div> 
 
        </AppointmentTemplate> 
        <Localization AdvancedAllDayEvent="All day" /> 
        <AdvancedForm DateFormat="M/d/yyyy" Modal="True" TimeFormat="h:mm tt" /> 
    </rad:RadScheduler> 
      
      
            <rad:RadContextMenu runat="server" ID="SchedulerAppointmentContextMenu" OnClientItemClicked="appointmentContextMenuItemClicked">  
            <Items> 
                <rad:RadMenuItem Text="Edit" /> 
                <rad:RadMenuItem IsSeparator="True" /> 
                <rad:RadMenuItem Text="Delete" /> 
            </Items> 
        </rad:RadContextMenu> 
        <rad:RadContextMenu runat="server" ID="SchedulerTimeSlotContextMenu" OnClientItemClicked="timeSlotContextMenuItemClicked">  
            <CollapseAnimation Type="none" /> 
            <Items> 
                <rad:RadMenuItem Text="New Appointment" /> 
            </Items> 
        </rad:RadContextMenu> 
      
</asp:Content> 
 

5 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 14 Dec 2009, 04:02 PM
Hello Alex,

Do you experience this problem with the current official version - 2009.3.1208?


Kind 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.
0
Alex
Top achievements
Rank 1
answered on 14 Dec 2009, 04:05 PM
I don't have / can't get version  2009.3.1208.
0
Veselin Vasilev
Telerik team
answered on 17 Dec 2009, 11:57 AM
Hello Alex,

It is available in the Free Trials section of your account:



Please try it

Regards,
Veselin Vasilev
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
Alex
Top achievements
Rank 1
answered on 22 Dec 2009, 04:47 PM
I updated my version of telerik to 2009 3.1208.20 but I'm still getting the same issue.

0
T. Tsonev
Telerik team
answered on 23 Dec 2009, 08:14 AM
Hello Alex,

The sprite image that we use for the appointment background supports maximum height of 1200px. Appointments higher than that will be cut off as in your screenshot.

One option is to lower the RowHeight value. We can also send you a custom sprite with the required height. Just let us know what maximum size it should support and for which skins.

I hope this helps.

All the best,
Tsvetomir Tsonev
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.
Tags
Scheduler
Asked by
Alex
Top achievements
Rank 1
Answers by
Peter
Telerik team
Alex
Top achievements
Rank 1
Veselin Vasilev
Telerik team
T. Tsonev
Telerik team
Share this question
or