I have a very plain drop down with only a few entries. Before this morning, the list is populated and you could click on any entry and nothing happened...which was fine because there was no code. Now I want it to do something when one of the list items is selcted (redirect to another page). So I added OnSelectedItemChanged = "RadComboBox1_OnSelectedItemChanged" to the html definition of the combobox, then in the code behind I have a function to match that does a Select Case statement and redirects to the appropriate page based on which item the user selects.
Now that I've added this code I can't click on the ComboBox anymore. It doesn't drop-down like it should.
HTML Page:
Code Behind .aspx page:
Now that I've added this code I can't click on the ComboBox anymore. It doesn't drop-down like it should.
HTML Page:
Choose Location: <telerik:RadComboBox ID="RadComboBox1" Runat="server" DropDownWidth="200px" EnableTextSelection="False" Height="50px" MaxHeight="200px" NoWrap="True" Width="200px" OnClientSelectedIndexChanged="RadComboBox1_SelectedIndexChanged"> <Items> <telerik:RadComboBoxItem runat="server" Text="Atlanta" Value="ATL" /> <telerik:RadComboBoxItem runat="server" Text="Cincinnati" Value="CIN" /> <telerik:RadComboBoxItem runat="server" Text="Cleveland" Value="CLV" /> <telerik:RadComboBoxItem runat="server" Text="Dayton" Value="DAY" /> <telerik:RadComboBoxItem runat="server" Text="Kansas City" Value="KC" /> <telerik:RadComboBoxItem runat="server" Text="Kansas" Value="KAN" /> <telerik:RadComboBoxItem runat="server" Text="Memphis" Value="MEM" /> <telerik:RadComboBoxItem runat="server" Text="Northeast Ohio" Value="NEO" /> <telerik:RadComboBoxItem runat="server" Text="Oklahoma City" Value="OKC" /> <telerik:RadComboBoxItem runat="server" Text="Philadelphia" Value="PHL" /> <telerik:RadComboBoxItem runat="server" Text="St. Louis" Value="STL" /> </Items></telerik:RadComboBox>Code Behind .aspx page:
Protected Sub RadComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles RadComboBox1.SelectedIndexChanged Select Case e.Value Case "ATL" Case "CIN" Case "CLV" Response.Redirect("http://www.someurl.com/CLV.asp") Case "DAY" Case "KAN" Case "KC" Case "MEM" Case "NEO" Case "OKC" Case "PHL" Case "STL" End Select End SubEnd Class