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

DropDownList does not trigger selectedIndexChanged on postback

1 Answer 105 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Silviu
Top achievements
Rank 1
Silviu asked on 12 May 2015, 07:53 AM

I have a telerik DDL like so:

 

 

<telerik:RadDropDownList ID="rddlNames" runat="server" DataSourceID="NamesDataSource" DataTextField="Name" DataValueField="ID" OnSelectedIndexChanged="rddlNames_SelectedIndexChanged" OnDataBound="rddlNames_DataBound" AutoPostBack="True" CausesValidation="false"></telerik:RadDropDownList>

protected void rddlNames_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e)
        {
            radTileList.Visible = true;
            radTileK.NavigateUrl = "KSignOut.aspx?DC=" + rddlNames.SelectedItem.Text;
            radTileT.NavigateUrl = "TSignOut.aspx?DC=" + rddlNames.SelectedItem.Text;
            radTileManageT.NavigateUrl = "ManageT.aspx?DC=" + rddlNames.SelectedItem.Text;
            radTileManageK.NavigateUrl = "ManageK.aspx?DC=" + rddlNames.SelectedItem.Text;
            radTileManageR.NavigateUrl = "ManageR.aspx?DC=" + rddlNames.SelectedItem.Text;
        }
 
        protected void rddlNames_DataBound(object sender, EventArgs e)
        {
            rddl.Items.Insert(0,new Telerik.Web.UI.DropDownListItem("---"));
                rddlNames.Items[0].Enabled = false;// Attributes.Add("disabled", "disabled");
            rddlNames.Items[0].Selected = true;
        }

 

 There is one major issue with it in that the selectedIndexChanged doesn't trigger when navigating to the root of the website i.e. http://locahost:1234

But if I navigate to http://localhost:1234/Default it works fine.

This is causing huge confusion among the users which keep reporting the website as not working.

 

Please suggest a fix for this as it is quite urgent.

 

Thank you.

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 14 May 2015, 02:11 PM
Hello Silviu,

I am not quite sure that I had fully understood the scenario, where you had encountered the issue. How do you navigate to the root of the website? Where the is the RadDropDownList located in your project? Please elaborate a bit more on the experienced problem.

Regards,
Nencho
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
DropDownList
Asked by
Silviu
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or