找不到组件“SharedCalendar”

时间:2012-08-14 10:35:53

标签: asp.net radscheduler

我正在使用telerik网站http://demos.telerik.com/aspnet-ajax/scheduler/examples/raddock/defaultcs.aspx中的radscheduler演示程序之一 在下面的标记中,有一个带有ID = SharedCalendar的radcalendar(在底部)。运行项目时出现错误,因为“Microsoft JScript运行时错误:Sys.InvalidOperationException:找不到组件'SharedCalendar'。”甚至虽然我将这个日历ID重命名为其他名称,但我也得到了同样的错误,因为“找不到组件'SharedCalendar'。”在这里找出问题。请帮助我。

    <asp:Panel runat="server" ID="DockPanel">
        <telerik:RadDock runat="server" ID="RadDock1" Width="650px" Height="530px" Closed="true"
            Style="z-index: 2000;" Title="Edit appointment" OnClientDockPositionChanged="dockMoved">
            <Commands>
                <telerik:DockCloseCommand />
            </Commands>
            <ContentTemplate>
                <div class="editForm">
                    <div class="header">
                        <asp:Label runat="server" ID="StatusLabel"></asp:Label>
                    </div>
                    <div class="content">
                        Description:<br />
                        <asp:TextBox runat="server" ID="DescriptionText" Width="240px"></asp:TextBox>
<asp:RequiredFieldValidator runat="server" ID="DescriptionTextRequiredFieldValidator"
Display="Dynamic" ControlToValidate="DescriptionText" ErrorMessage="Description is required" />
                        <br />
                        <br />
                        Starts at:
                        <telerik:RadDateTimePicker ID="StartTime" runat="server" SharedCalendarID="SharedCalendar"
                            SharedTimeViewID="SharedTimeView">
                        </telerik:RadDateTimePicker>
<asp:RequiredFieldValidator runat="server" ID="StartTimeRequiredFieldValidator" Display="Dynamic"
ControlToValidate="StartTime" ErrorMessage="Start time is required" />
                        <br />
                        <br />
                        Ends at:
                        <telerik:RadDateTimePicker ID="EndTime" runat="server" SharedCalendarID="SharedCalendar"
                            SharedTimeViewID="SharedTimeView">
                        </telerik:RadDateTimePicker>
<asp:RequiredFieldValidator runat="server" ID="EndTimeRequiredFieldValidator" Display="Dynamic"
ControlToValidate="EndTime" ErrorMessage="End time is required" />
                        <br />
                        <br />
                        Assigned to:
<asp:DropDownList runat="server" ID="UserDropDown" DataSourceID="UsersDataSource"
DataTextField="UserName" DataValueField="ID">
                        </asp:DropDownList>
                        <br />
                        <br />
                        <asp:Label runat="server" Text="Reminder" ID="lblReminders"></asp:Label>
                        <telerik:RadComboBox runat="server" ID="ReminderDropDown" Width="120px">
                            <Items>
                                <telerik:RadComboBoxItem Text="None" Value="" />
                                <telerik:RadComboBoxItem Text="0 minutes" Value="0" />
                                <telerik:RadComboBoxItem Text="1 minute" Value="5" />
                                <telerik:RadComboBoxItem Text="2 minutes" Value="10" />
                                <telerik:RadComboBoxItem Text="3 minutes" Value="15" />
                                <telerik:RadComboBoxItem Text="4 minutes" Value="30" />
                                <telerik:RadComboBoxItem Text="1 hour" Value="60" />
                                <telerik:RadComboBoxItem Text="2 hours" Value="120" />
                                <telerik:RadComboBoxItem Text="3 hours" Value="180" />
                                <telerik:RadComboBoxItem Text="4 hours" Value="240" />
                                <telerik:RadComboBoxItem Text="5 hours" Value="300" />
                                <telerik:RadComboBoxItem Text="6 hours" Value="360" />
                                <telerik:RadComboBoxItem Text="7 hours" Value="420" />
                                <telerik:RadComboBoxItem Text="8 hours" Value="480" />
                                <telerik:RadComboBoxItem Text="9 hours" Value="540" />
                                <telerik:RadComboBoxItem Text="10 hours" Value="600" />
                                <telerik:RadComboBoxItem Text="11 hours" Value="660" />
                                <telerik:RadComboBoxItem Text="12 hours" Value="720" />
                                <telerik:RadComboBoxItem Text="18 hours" Value="1080" />
                                <telerik:RadComboBoxItem Text="1 day" Value="1440" />
                                <telerik:RadComboBoxItem Text="2 days" Value="2880" />
                                <telerik:RadComboBoxItem Text="3 days" Value="4320" />
                                <telerik:RadComboBoxItem Text="4 days" Value="5760" />
                                <telerik:RadComboBoxItem Text="1 week" Value="10080" />
                                <telerik:RadComboBoxItem Text="2 weeks" Value="20160" />
                            </Items>
                        </telerik:RadComboBox>
                    </div>
                    <div class="footer">
                        <asp:Button runat="server" ID="SubmitButton" Text="Update" OnClick="SubmitButton_Click" />
                        <button onclick="hideForm();" type="button" style="margin-right: 20px;">
                            Cancel</button>
                    </div>
                    <telerik:RadTimeView ID="SharedTimeView" runat="server">
                    </telerik:RadTimeView>
                    <telerik:RadCalendar ID="SharedCalendar" runat="server" EnableMonthYearFastNavigation="False"
                        EnableMultiSelect="False" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False">
                    </telerik:RadCalendar>

                    <asp:HiddenField runat="server" ID="_originalRecurrenceRule" />

                    <telerik:RadSchedulerRecurrenceEditor runat="server" ID="RadSchedulerRecurrenceEditor1" />

                </div>
            </ContentTemplate>
        </telerik:RadDock>
    </asp:Panel>

1 个答案:

答案 0 :(得分:0)

我在某个时候也遇到过同样的问题。但是能够使用SharedCalendarID弄明白。点击here查看我找到的解决方案。