Add entries to RadComboBox that is in AdvancedEditTemplate

2 posts, 0 answers
  1. Curtis
    Curtis avatar
    2 posts
    Member since:
    Dec 2013

    Posted 09 Jan 2014 Link to this post

    I am using the RadScheduler control, inside the AdvancedEditTemplate there is a RadComboBox.

    The RadComboBox is displaying a list of patients, they will search the list of people and if they can not find the person they need to add them. So they click the button next to it and a window will popup where they enter all the info. How do I refresh the RadComboBox with the newly added patient selected?

    Thank you for your help.

    <telerik:RadScheduler ID="rschVisits" runat="server"
        DataSourceID="sqlConnVisits"  SelectedView="WeekView"
        DataKeyField="visit_id" DataSubjectField="subject"
        DataStartField="start_time" DataEndField="end_time"
        FirstDayOfWeek="Monday" Height="750px"
        Width="1000px" StartInsertingInAdvancedForm="True"
        HoursPanelTimeFormat="htt" MinutesPerRow="15" ShowAllDayRow="False"
        <AdvancedForm Modal="true" />
        <Reminders Enabled="false" />
         <AppointmentContextMenuSettings EnableDefault="true" />
        <B><%#Eval("last_name")%>, <%#Eval("first_name")%></B><br />
        Room: <%#Eval("room_name")%>       
        <div class="rsAdvancedEdit" style="position: relative">  
            <%-- Title bar. --%> 
            <div class="rsAdvTitle">  
                <%-- The rsAdvInnerTitle element is used as a drag handle when the form is modal. --%> 
                <h1 class="rsAdvInnerTitle">  
                    Update Appointment</h1
                <asp:LinkButton runat="server" ID="AdvancedEditCloseButton" CssClass="rsAdvEditClose" 
                    CommandName="Cancel" CausesValidation="false" ToolTip='close'>  
            <div class="rsAdvContentWrapper">  
                    <telerik:RadComboBox ID="rcbPatients" runat="server" Height="200" Width="200"
                          SelectedValue='<%# Bind("patient_id") %>'
                          DataSourceID="sqlConnPatients" DataValueField="patient_id" DataTextField="full_name"
                          DropDownWidth="310" EmptyMessage="Choose Patient" HighlightTemplatedItems="true"
                          EnableLoadOnDemand="true" Filter="Contains" >
                               <table style="width: 275px" cellspacing="0" cellpadding="0">
                                         <td style="width: 175px;">
                                              Patient Name
                                         <td style="width: 60px;">
                                         <td style="width: 40px;">
                               <table style="width: 275px" cellspacing="0" cellpadding="0">
                                         <td style="width: 175px;">
                                        <%#DataBinder.Eval(Container.DataItem, "last_name").ToString%>,
                                        <%#DataBinder.Eval(Container.DataItem, "first_name").ToString%>
                                         <td style="width: 60px;">
                                        <%#getDateFromYYYYMMDD(DataBinder.Eval(Container.DataItem, "dob").ToString)%>
                                         <td style="width: 40px;">
                    <asp:ImageButton id="ImageButton22" runat="server" Alt="Client Search" ImageUrl="~/img/binocs_icon.jpg" OnClientClick="return AddPatient();"></asp:ImageButton>
                <asp:Panel runat="server" ID="ButtonsPanel" CssClass="rsAdvancedSubmitArea">  
                    <div class="rsAdvButtonWrapper">  
                        <asp:LinkButton CommandName="Update" ValidationGroup="EditVisit"  runat="server" ID="UpdateButton" CssClass="rsAdvEditSave">  
                        <asp:LinkButton runat="server" ID="CancelButton" CssClass="rsAdvEditCancel" CommandName="Cancel" 
                        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox=true ShowSummary=false
                        HeaderText="Please enter the following." ValidationGroup="EditVisit" />                           
        <TimeSlotContextMenuSettings EnableDefault="true" />
        <AppointmentContextMenuSettings EnableDefault="true" />

  2. Plamen
    Plamen avatar
    2816 posts

    Posted 14 Jan 2014 Link to this post


    In such specific scenarios where the advanced form should be with a lot of custom logic we strongly recommend using custom user control as in the Advanced Template on-line demo. I this used control you can implement whatever scenario you need. You can refer to this Code Library where sample runnable projects with such scenarios are provided.

    Hope this information will be helpful.

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top