Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > ComboBox > Conditionally fire SelectedIndexChanged event

Not answered Conditionally fire SelectedIndexChanged event

Feed from this thread
  • Alexandre avatar

    Posted on Feb 6, 2012 (permalink)

    Dear Telerik Support

    I need to Fire the event SelectedIndexChanged on my RadComboBox only if the user selects something on the list, rather than typing something on it. Is it possible? If you need more information, please let me know.

    Reply

  • Kate Kate admin's avatar

    Posted on Feb 9, 2012 (permalink)

    Hi Alexandre,

    In general when having the following properties set to the RadCombobox control the SelectedIndexChanged event fires only when an item is selected:
    <asp:Label ID="Label1" runat="server" Text="lbl1"></asp:Label>
        <telerik:RadComboBox ID="RadComboBox2" runat="server" AutoPostBack="True" AllowCustomText="True" OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged">
            <Items>
                <telerik:RadComboBoxItem Text="test 1" />
                <telerik:RadComboBoxItem Text="test 2" />
                <telerik:RadComboBoxItem Text="test 3" />
            </Items>
        </telerik:RadComboBox>

    code behind:
    protected void RadComboBox1_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            Label1.Text = "You selected " + e.Text + " item";
        }

    Greetings,
    Kate
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > ComboBox > Conditionally fire SelectedIndexChanged event
Related resources for "Conditionally fire SelectedIndexChanged event"

ASP.NET ComboBox Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]