Dynamic C1Menu not firing event

Originally Posted 7 August 2014, 6:17 am EST

  • Originally Posted 7 August 2014, 6:17 am EST

    Hi, I have the following code, generated dynamically.


    Dim menu As New C1Menu
    Dim menuitem As New C1MenuItem
    menu.Theme = "cobalt"
    menu.TriggerEvent = TriggerEvent.Rtclick
    menuitem.Text = labeli.Text
    menuitem.ID = labeli.Text
    menu.Orientation = C1.Web.Wijmo.Controls.Orientation.Vertical
    menu.Items.Add(menuitem)
    menu.AutoPostBack = True
    menu.Animation.Easing = C1.Web.Wijmo.Controls.Easing.EaseInOutQuad
    AddHandler menu.ItemClick, AddressOf MenuSelected






    I add the trigger to the same label
     menu.Trigger = "#" & labeli.ClientID


    My problem is that the MenuSelected function doesn't fire on itemclick.

    The page just postbacks.

    Protected Sub MenuSelected(sender As Object, e As Controls.C1Menu.C1MenuEventArgs)
    MsgBox("Something")
    End Sub
  • Reply

    Hello,

    You would need to correct the code for event . Please use the code as follows:

    Protected Sub MenuSelected(sender As Object, e As Controls.C1Menu.C1MenuEventArgs)  Handles C1Menu1.ItemClick
    MsgBox("Something")
    End Sub



    Thanks,
    Deepak Sharma
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels