高级表单中的Rad Scheduler文本框

时间:2012-08-17 13:40:08

标签: c# asp.net telerik

我正在处理RadScheduler

<telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="End" DataKeyField="ID"
        DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID"
        DataSourceID="SchedulerDataSource" DataDescriptionField="Description" Height="700px"
        DataStartField="Start" DataSubjectField="Subject" EnableEmbeddedSkins="true"
        Skin="Windows7" OnAppointmentCreated="RadScheduler1_AppointmentCreated" AdvancedForm-Enabled="true"
        OnAppointmentDataBound="RadScheduler1_AppointmentDataBound1" OnDataBound="RadScheduler1_DataBound"
        StartInsertingInAdvancedForm="true">
        <AppointmentContextMenuSettings EnableDefault="true" />
        <AdvancedForm Modal="true" />
        <TimelineView UserSelectable="false" />
        <ResourceTypes>
            <telerik:ResourceType DataSourceID="RoomsDataSource" ForeignKeyField="RoomID" KeyField="ID"
                Name="Room" TextField="RoomName" />
            <telerik:ResourceType DataSourceID="DocDataSource" ForeignKeyField="DoctorID" KeyField="UID"
                Name="DoctorName" TextField="first_name" />
            <telerik:ResourceType DataSourceID="PatientDataSource" ForeignKeyField="PatientID"
                KeyField="UID" Name="PatientName" TextField="FullName" />
            <telerik:ResourceType DataSourceID="TypeDataSource" ForeignKeyField="TypeID" KeyField="UID"
                Name="Type" TextField="UtilityValue" />
            <telerik:ResourceType DataSourceID="SqlClinic" ForeignKeyField="CompanyId" KeyField="CompanyId"
                Name="Clinic" TextField="CompanyName" />
        </ResourceTypes>
        <ResourceStyles>
            <telerik:ResourceStyleMapping Text="DoctorName" BackColor="Chocolate" />
        </ResourceStyles>
        <AppointmentTemplate>
            <div>
                <asp:Panel ID="RecurrencePanel" CssClass="rsAptRecurrence" runat="server" Visible="false" />
                <asp:Panel ID="RecurrenceExceptionPanel" CssClass="rsAptRecurrenceException" runat="server"
                    Visible="false" />
                <asp:Panel ID="ReminderPanel" CssClass="rsAptReminder" runat="server" Visible="false" />
                <%#Eval("Subject") %>

            </div>
            <hr />
            <div>
                           Doctor: <strong>
                    <%#Container.Appointment.Resources.GetResourceByType("DoctorName").Text%>
                </strong>
                <br />
                Patient: <strong>
                    <%#Container.Appointment.Resources.GetResourceByType("PatientName").Text%>
                </strong>
                <br />
                Room: <strong>
                    <%#Container.Appointment.Resources.GetResourceByType("Room").Text%>
                </strong>
                <br />
                Type: <strong>
                    <%#Container.Appointment.Resources.GetResourceByType("Type").Text%>
                </strong>
                <br />
                Clinic : <strong>
                    <%#Container.Appointment.Resources.GetResourceByType("Clinic").Text%>
                </strong>
                <br />

            </div>
        </AppointmentTemplate>

    </telerik:RadScheduler>
    <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" OnAjaxUpdate="RadToolTipManager1_AjaxUpdate">
    </telerik:RadToolTipManager>
    <asp:SqlDataSource ID="SchedulerDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        DeleteCommand="DeleteAppointments" DeleteCommandType="StoredProcedure" InsertCommand="INSERT INTO [Appointments] ([Subject], [Start], [End], [RecurrenceRule], [RecurrenceParentID], [Description], [RoomID],[DoctorID],[PatientID],[TypeID],[CompanyId]) VALUES (@Subject, @Start, @End, @RecurrenceRule, @RecurrenceParentID, @Description, @RoomID,@DoctorID,@PatientID,@TypeID,@CompanyId) select @@Identity"
        SelectCommand="SearchAppointmentsDefault" SelectCommandType="StoredProcedure"
        UpdateCommand="UPDATE [Appointments] SET [Subject] = @Subject, [Start] = @Start, [End] = @End, [RecurrenceRule] = @RecurrenceRule, [RecurrenceParentID] = @RecurrenceParentID, [Description] = @Description, [RoomID] = @RoomID,[DoctorID]=@DoctorID,[PatientID]=@PatientID, [TypeID]=@TypeID,[CompanyId]=@CompanyId WHERE [ID] = @ID">
        <InsertParameters>
            <asp:Parameter Name="Subject" Type="String" />
            <asp:Parameter Name="Start" Type="DateTime" />
            <asp:Parameter Name="End" Type="DateTime" />
            <asp:Parameter Name="RecurrenceRule" Type="String" />
            <asp:Parameter Name="RecurrenceParentID" Type="Int32" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="RoomID" Type="Int32" />
            <asp:Parameter Name="DoctorID" Type="Int32" />
            <asp:Parameter Name="PatientID" Type="Int32" />
            <asp:Parameter Name="TypeID" Type="Int32" />
            <asp:Parameter Name="CompanyId" Type="Int32" />
        </InsertParameters>
        <DeleteParameters>
            <asp:Parameter Name="AuditId" Type="Int64" />
            <asp:Parameter Name="ID" Type="Int64" />
        </DeleteParameters>
    </asp:SqlDataSource>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <asp:SqlDataSource ID="RoomsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT [ID], [RoomName] FROM [Rooms]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="DocDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT [UID], [first_name] FROM [Teacher]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="PatientDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SelectPatients" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="TypeDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT [UID], [UtilityValue] from [utility] where utilityGroup='Type'">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDoctor" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="GetTeacherInfoForScheduler" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:Parameter Name="companyId" Type="string" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlClinic" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="getCompanies" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:Parameter Name="Company" Type="string" />
        </SelectParameters>
    </asp:SqlDataSource>


by using this I can able to get the patients names but they are loading in dropdown,
<telerik:ResourceType DataSourceID="PatientDataSource" ForeignKeyField="PatientID"
                KeyField="UID" Name="PatientName" TextField="FullName" />

有4000名患者。 DropDown不允许基于文本的搜索。用户必须滚动数千名患者才能找到他们正在寻找的患者。

是否有适合我需要的控件,例如autocompletefield

1 个答案:

答案 0 :(得分:0)

嗯,你已经在使用Telerik了,你可以使用ComboBox

话虽如此,使用jQuery也有简单的方法。我发现的最好的一个是SelectToAutocomplete plugin。它将采用您的标准选择框并使其非常棒。

相关问题