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

Add entries to RadComboBox that is in AdvancedEditTemplate

1 Answer 26 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Curtis
Top achievements
Rank 1
Curtis asked on 09 Jan 2014, 11:13 PM

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"
    CustomAttributeNames="practice_room_id,practice_id,patient_id,billing_note,last_name,first_name,room_name,visit_type_id,visit_status_id,visit_reason,elig_status"
    EnableCustomAttributeEditing="True"
    HoursPanelTimeFormat="htt" MinutesPerRow="15" ShowAllDayRow="False"
    >
    <AdvancedForm Modal="true" />
    <Reminders Enabled="false" />
     <AppointmentContextMenuSettings EnableDefault="true" />
     
    <AppointmentTemplate>
            
    <B><%#Eval("last_name")%>, <%#Eval("first_name")%></B><br />
    Room: <%#Eval("room_name")%>       
             
    </AppointmentTemplate>
    <AdvancedEditTemplate
    <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'>  
                close  
            </asp:LinkButton
        </div
        <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" >
 
                      <HeaderTemplate>
                           <table style="width: 275px" cellspacing="0" cellpadding="0">
                                <tr>
                                     <td style="width: 175px;">
                                          Patient Name
                                     </td>
 
                                     <td style="width: 60px;">
                                          DOB
                                     </td>
                                     <td style="width: 40px;">
                                     </td>
                                </tr>
                           </table>
 
                      </HeaderTemplate>
                      <ItemTemplate>
                           <table style="width: 275px" cellspacing="0" cellpadding="0">
                                <tr>
                                     <td style="width: 175px;">
                                    <%#DataBinder.Eval(Container.DataItem, "last_name").ToString%>,
                                    <%#DataBinder.Eval(Container.DataItem, "first_name").ToString%>
                                     </td>
                                     <td style="width: 60px;">
                                    <%#getDateFromYYYYMMDD(DataBinder.Eval(Container.DataItem, "dob").ToString)%>
                                     </td>
                                     <td style="width: 40px;">
                                     </td>
                                </tr>
                           </table>
                      </ItemTemplate>
                 </telerik:RadComboBox>
                <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">  
            <span>Save</span
                    </asp:LinkButton
                    <asp:LinkButton runat="server" ID="CancelButton" CssClass="rsAdvEditCancel" CommandName="Cancel" 
                        CausesValidation="false">  
            <span>Cancel</span
                    </asp:LinkButton
                     
                     
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox=true ShowSummary=false
                    HeaderText="Please enter the following." ValidationGroup="EditVisit" />                           
                     
                </div
            </asp:Panel
        </div
    </div
    </AdvancedEditTemplate
     
     
    <AdvancedInsertTemplate>
    .....
 
     </AdvancedInsertTemplate>          
 
    <TimeSlotContextMenuSettings EnableDefault="true" />
    <AppointmentContextMenuSettings EnableDefault="true" />
     
</telerik:RadScheduler>

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 14 Jan 2014, 09:22 AM
Hello,

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.

Regards,
Plamen
Telerik
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.
Tags
Scheduler
Asked by
Curtis
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or