Prevent Selectedindexchanged event when DataSource is bound in raddropdownlist?

2 posts, 0 answers
  1. Tra
    Tra avatar
    2 posts
    Member since:
    Feb 2018

    Posted 15 Feb 2018 Link to this post

    Hi this is my first time posting here in telerik. I have a drop down list and planning to do disable selectedindexchange event before I bound it's datasource. I tried this  code:  this.comboBox1.SelectedIndexChanged -= new EventHandler(comboBox1_SelectedIndexChanged); but it gives me "No overload for 'comboBox1_SelectedIndexChanged matches delegate system.eventhandler. 
  2. Dimitar
    Dimitar avatar
    2960 posts

    Posted 16 Feb 2018 Link to this post

    Hello Tra,

    It appears the event handler cannot be found or has invalid arguments. The following snippet shows how you can unsubscribe along with the event handler:
    public RadForm1()
        radDropDownList1.SelectedIndexChanged += RadDropDownList1_SelectedIndexChanged;
        radDropDownList1.SelectedIndexChanged -= RadDropDownList1_SelectedIndexChanged;
    private void RadDropDownList1_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)

    I hope this will be useful. Let me know if you have additional questions.

    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top