2017-12-18 358 views
0

我的自定義控件基於Telerik的控制自定義控制的SelectedIndexChanged沒有被解僱

Public Class ComboBoxСountries 
    Inherits RadComboBox 
End Class 

使用控制

<mc:ComboBoxСountries ID="ComboCountry" runat="server" Width="100%" AutoPostBack="true"></mc:ComboBoxСountries> 

事件

Protected Sub ComboCountry_SelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs) Handles ComboCountry.SelectedIndexChanged 
    ' not fired 
End Sub 

ComboCountry_SelectedIndexChanged沒有被解僱,但是如果使用<telerik:RadComboBox />一切正常。如何解決這個問題呢?

+0

也許你需要'OnLoad'事件過程中添加自定義事件處理程序是這樣的:'ComboCountry.SelectedIndexChanged + =新的EventHandler(ComboCountry_SelectedIndexChanged)'。 –

+1

@Tetsuya Yamamoto多數民衆贊成不是如何處理程序添加到vb.net中... – Codexer

回答

0

添加OnSelectedIndexChanged = 「ComboCountry_SelectedIndexChanged」 幫助

<mc:ComboBoxСountries ID="ComboCountry" runat="server" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="ComboCountry_SelectedIndexChanged"></mc:ComboBoxСountries>