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

Adding second RadComboBox causes some controls not to function

1 Answer 80 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Cecil
Top achievements
Rank 1
Cecil asked on 24 Dec 2011, 02:14 AM
I have a simple page in which I have a RadComboBox and a RadDatePicker. 
All works fine, until I add a second RadComboBox.
At this point neither the RadDatePicker nor the second RadComboBox function. 
If I take out the second RadComboBox, all is well again.

Any Thoughts?


TraingWizard_Step_1.aspx....

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/TrainingWizard.Master" CodeBehind="TrainingWizard_Step_1.aspx.vb" Inherits="TrainingWizard.TrainingWizard_Step_1" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type = "text/css">
        .a, .a:active, .a:link, .a:visited{color:Blue; font-size:large; width:92%; text-align:left; text-decoration:none; font-variant:small-caps; margin:auto auto auto 48px;}
        .a:hover{color:Red; font-size:large; width:92%; text-align:left; text-decoration:none; font-variant:small-caps; margin:auto auto auto 48px;}
    </style>
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="BodyContent" runat="server">
    <div style = "width:98%;text-align:center;">
         
            <br /><br />
            <h2>
                Step 1 - Company Name
            </h2>
            <br />
         
                    <telerik:RadComboBox ID="rcbCompanies" Runat="server"                   
                        Width="200px" Height="140px"
                        EmptyMessage="Company Name"
                        DataSourceID="SqlDataSource1" DataTextField="rcbName" DataValueField="CompanyID"                   
                        allowcustomtext="false" Filter="Contains"
                        EnableAutomaticLoadOnDemand="true"
                        ItemsPerRequest="10"
                        ShowMoreResultsBox="true"
                        EnableVirtualScrolling="true">
                    </telerik:RadComboBox><br />
                    <asp:RequiredFieldValidator ID="Validator1" ControlToValidate="rcbCompanies" ForeColor="Red" Text="This is required Information!" runat="server" />
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                        ConnectionString="<%$ ConnectionStrings:SafetyPlusWebConnectionString %>"
                        SelectCommand="SELECT CompanyID, Company_Code + ' | '  + Name as rcbName FROM [Companies] WHERE ([Active] = 1) ORDER BY [Company_Code]">
                    </asp:SqlDataSource>                                       
                    <br /><br />
         
                  
                     
                    <h2>
                        Step 2 - Course Details
                    </h2>                    
                    <br />
         
                 
             
            <telerik:RadDatePicker ID="rdpTrainingDate" runat="server" ZIndex="30001" AutoPostBack="true" DateInput-EmptyMessage="Training Date"/><br />
            <asp:RequiredFieldValidator ID="Validator2" ControlToValidate="rdpTrainingDate" ForeColor="Red" Text="This is required Information!" runat="server" />
            <br /><br />
         
 
                    <telerik:RadComboBox ID="rcbTrainingType" Runat="server"                   
                        Width="200px" Height="140px" AutoPostBack="true"
                        EmptyMessage="Training Type"
                        OnClientSelectedIndexChanged="Training_Type_Picked">            
                <Items>
                    <telerik:RadComboBoxItem Text="Toolbox Talk" Value="1"></telerik:RadComboBoxItem>
                    <telerik:RadComboBoxItem Text="Instructor Led" Value="2" ></telerik:RadComboBoxItem>
                    <telerik:RadComboBoxItem Text="Computer Based Training" Value="3"></telerik:RadComboBoxItem>
                    <telerik:RadComboBoxItem Text="Other" Value="4"></telerik:RadComboBoxItem>
                </Items>
            </telerik:RadComboBox>
            <asp:RequiredFieldValidator ID="Validator3" ControlToValidate="rcbTrainingType" ForeColor="Red" Text="This is required Information!" runat="server" />
            <br />      
                    
         
         
            <br /><br />          
            <asp:TextBox ID="tbInstructor" runat="server" Width="200" Text="Instructor Name" Visible="false"></asp:TextBox>
            <br /><br />
         
         
        <asp:Button ID="btnNext" runat="server" Text="Next" />
 
        
    </div>
     
</asp:Content>

1 Answer, 1 is accepted

Sort by
0
Cecil
Top achievements
Rank 1
answered on 24 Dec 2011, 06:32 PM
Ok, maybe I'm not the genius my wife thinks I am...

Coded the second RadComboBox with "OnClientSelectedIndexChanged" and the codebehind with "OnSelectedIndexChanged"..

Once that was corrected, everything is fine...
Tags
ComboBox
Asked by
Cecil
Top achievements
Rank 1
Answers by
Cecil
Top achievements
Rank 1
Share this question
or