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

Advanced Insert Form and ajax

1 Answer 102 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jaimie
Top achievements
Rank 1
Jaimie asked on 07 Apr 2010, 03:16 AM
I have a RadScheduler and defined like the code below. My question is:

If i already had a ajax manager in the aspx page.
1. How can i setup the ajax settings for two RadCombox: RadComboBoxAppointmentReason and RadComboBoxAppointmentLength

2. How can i write the SelectedIndexChange function for ComboBox RadComboBoxAppointmentReason at server side to update the selected index of RadComboBoxAppointmentLength

thanks

   <telerik:RadScheduler  
                        runat="server" ID="RadSchedulerCalendar" 
                        Width="800px" OverflowBehavior="Expand" 
                        EnableEmbeddedSkins="True" DayStartTime="09:00:00" DayEndTime="17:45:00" AllowInsert="true"   
                        style="float:left"   
                        TimeZoneOffset="00:00:00" ShowAllDayRow="false" SelectedView="WeekView" 
                        FirstDayOfWeek="Monday" 
                        MinutesPerRow="15" TimeLabelRowSpan="4" WorkDayEndTime="17:45:00"   
                        WorkDayStartTime="09:00:00" ShowFooter="False"   
                        StartInsertingInAdvancedForm="True" Height="1200px" LastDayOfWeek="Sunday"   
                        NumberOfHoveredRows="1" RowHeight="20px" SelectedDate=""   
                        Culture="English (Australia)"   
                        ShowNavigationPane="False" EnableDescriptionField="true"   
                        ontimeslotcreated="RadSchedulerCalendar_TimeSlotCreated"   
                        onappointmentdatabound="RadSchedulerCalendar_AppointmentDataBound"   
                        onappointmentcommand="RadSchedulerCalendar_AppointmentCommand"   
                        onformcreated="RadSchedulerCalendar_FormCreated">  
                          
                        <WeekView  
                            HeaderDateFormat="MMMM dd" 
                            ColumnHeaderDateFormat="ddd, dd" DayEndTime="17:45:00"   
                            DayStartTime="09:00:00" WorkDayEndTime="17:45:00" WorkDayStartTime="09:00:00" /> 
                        <AppointmentTemplate> 
                            <div> 
                                <%# Eval("Subject") %> 
                            </div> 
                        </AppointmentTemplate>     
                        <AdvancedInsertTemplate> 
                        <div class="appointmentEditForm">  
                            
                               
                                <div class="appointmentHeader">  
                                    <div> 
                                        Schedule:  
                                        <asp:Label ID="lblScheduleTop" runat="server" 
                                            Width="300px">  
                                        </asp:Label> 
                                    </div> 
                                    <br /> 
                                    <div> 
                                        Appointment Date/Time:  
                                        <asp:Label ID="lblAppointmentStartTop" runat="server"    
                                            Width="300px">  
                                        </asp:Label> 
                                    </div> 
                                </div> 
                                <div class="appointmentContent">  
                                    Note:<br /> 
                                    <telerik:RadTextBox ID="RadTextBoxNote" Runat="server" MaxLength="80" Rows="5"   
                                        TextMode="MultiLine" Width="600px">  
                                    </telerik:RadTextBox> 
                                    <br /> 
                                    <br />        
                                        Appointment Reason *:<br /> 
                                    <telerik:RadComboBox ID="RadComboBoxAppointmentReason" runat="server" AutoPostBack="true" 
                                        DropDownWidth="600px" Width="250px" HighlightTemplatedItems="True">  
                                        <HeaderTemplate> 
                                            <table style="width: 550px" cellspacing="0" cellpadding="0">  
                                                <tr> 
                                                    <td style="width: 350px;">  
                                                        Reason</td> 
                                                    <td style="width: 200px;">  
                                                        Color</td>   
                                                </tr> 
                                            </table> 
                                        </HeaderTemplate> 
                                        <ItemTemplate> 
                                            <table style="width: 550px;" cellspacing="0" cellpadding="0">  
                                                <tr> 
                                                    <td style="width: 350px;">  
                                                        <%# DataBinder.Eval(Container, "Text")%> 
                                                    </td> 
                                                    <td style="width: 200px;">  
                                                        <div style="background-color: <%# DataBinder.Eval(Container, "Attributes['color']") %>; width:150px; height:20px;"> 
                                                        </div> 
                                                    </td> 
                                                </tr> 
                                            </table> 
                                        </ItemTemplate> 
                                    </telerik:RadComboBox>                                    
                                    <br /> 
     
                                    <br /> 
                                        Appointment Length (min):<br /> 
                                    <telerik:RadComboBox ID="RadComboBoxAppointmentLength" runat="server"   
                                        DropDownWidth="200px" Width="150px" HighlightTemplatedItems="true">                                         
                                        <Items> 
                                            <telerik:RadComboBoxItem Value="15" Text="15 min" /> 
                                            <telerik:RadComboBoxItem Value="30" Text="30 min" /> 
                                            <telerik:RadComboBoxItem Value="45" Text="45 min" /> 
                                            <telerik:RadComboBoxItem Value="60" Text="60 min" /> 
                                        </Items> 
                                    </telerik:RadComboBox>                                     
                                </div> 
                                <br /> 
                                <div class="appointmentFooter">  
                                    <asp:Button runat="server" ID="SubmitButton" Text="Create" CommandName="Insert"/>  
                                    <asp:Button runat="server" ID="CancelButton" Text="Cancel" CommandName="Cancel" />        
                                </div> 
                        </div> 
                        </AdvancedInsertTemplate>                
                    </telerik:RadScheduler>    

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 09 Apr 2010, 01:58 PM
Hello Jaimie,

1. Since the advanced form is part of RadScheduler, it is enough to configure RadAjaxManager so that RadScheduler updates itself.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
       <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="RadScheduler1">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
               </UpdatedControls>
           </telerik:AjaxSetting>
       </AjaxSettings>
   </telerik:RadAjaxManager>

Or, you can simply wrap RadScheduler in RadAjaxPanel.

2. There is a kb artticle which you can use as reference for this requirement:
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/implement-related-radcombobox-controls-in-the-advanced-form.aspx


Regards,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Scheduler
Asked by
Jaimie
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or