0

我在 Telerik 站点http://demos.telerik.com/aspnet-ajax/scheduler/examples/raddock/defaultcs.aspx使用 radscheduler 的演示之一 在下面的标记中,有一个 ID=SharedCalendar(在底部)。在运行项目时,我收到一个错误,因为“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>
4

1 回答 1

0

我以前也遇到过同样的问题。但是能够使用 SharedCalendarID 弄清楚。单击此处查看我找到的解决方案。

于 2014-01-22T17:46:24.097 回答