RadComboBox AddHandler not working

2 posts, 0 answers
  1. Tim
    Tim avatar
    8 posts
    Member since:
    May 2015

    Posted 16 Jun 2015 Link to this post

    I am creating a RadComboBox from code and setting an AddHandler as follows:

    Create new Panel

    dim kcmbo as RadComboBox

    kcmbo = new RadComboBox

    ... set properties to kcmbo

    AddHandler kcmbo .SelectedIndexChanged, AddressOf ComboChanged

    Add kcmbo to Panel

    Add Panel to page

     _______________________

    Private Sub ComboChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

            do stuff....

    End Sub
    ___________________________

    Event does not fire when selected index is changed

     

     

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 19 Jun 2015 Link to this post

    Hello,

    Make sure you set the RadComboBox's AutoPostBack property to true, otherwise the SelectedIndexChanged will not fire:

    kcmbo.AutoPostBack = True
    kcmbo.SelectedIndexChanged += New RadComboBoxSelectedIndexChangedEventHandler(Me.RadComboBox2_SelectedIndexChanged)

    Regards,
    Ivan Danchev
    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top