Hello,
I have a menu with an item template. Inside it there is a checkbox. I'd like to postback when the checkbox checked state is changed, but cant get it to work. Here is the code:
But the event is never fired. Can you please tell me what am I doing wrong?
Thank you very much.
I have a menu with an item template. Inside it there is a checkbox. I'd like to postback when the checkbox checked state is changed, but cant get it to work. Here is the code:
<telerik:RadMenu ID="RadMenu1" runat="server" EnableRoundedCorners="True" EnableShadows="True" Skin="Office2007" > <Items> <telerik:RadMenuItem runat="server" Text="Profile" PostBack="False" > <Items> <telerik:RadMenuItem runat="server" Text="Save current selections as default" Font-Size="12px"> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" Text="Load default selections" Font-Size="12px"> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" IsSeparator="True" Text="Child RadMenuItem 3" Font-Size="12px" PostBack="False"> </telerik:RadMenuItem> <telerik:RadMenuItem Text="AlwaysLoad" > <ItemTemplate> <asp:CheckBox ID="chkAlwaysLoad" runat="server" Text=" Always load default selections" Font-Size="11px" /> </ItemTemplate> </telerik:RadMenuItem> <telerik:RadMenuItem Text="AlwaysSave" > <ItemTemplate> <asp:CheckBox ID="chkAlwaysSave" runat="server" Text=" Always save current selections" Font-Size="11px" /> </ItemTemplate> </telerik:RadMenuItem> </Items> </telerik:RadMenuItem> </Items> </telerik:RadMenu>Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Dim alwaysSave As CheckBox = RadMenu1.FindItemByText("AlwaysSave").FindControl("chkAlwaysSave") AddHandler alwaysSave.CheckedChanged, AddressOf alwaysSave_CheckedChangedProtected Sub alwaysSave_CheckedChanged(sender As Object, e As System.EventArgs) Profile.CreateProject.AlwaysSave = sender.Checked End SubBut the event is never fired. Can you please tell me what am I doing wrong?
Thank you very much.