This guide explains how to execute custom code when an item is clicked in both K2BAccordionMenu and K2BHorizontalMenu.
- Define a variable for the Selected Item
- Create a variable (e.g., &SelectedItem) of type Character. This variable will hold the code of the selected item.
- Bind the Variable to the User Control's SelectedItem Property
- Assign the &SelectedItem variable to the SelectedItem property of the user control.
 |
SelectedItem variable in the user control properties |
- Implement the OptionClicked Event
- Implement the event UCControlName.OptionClicked
- In K2BHorizontalMenu from version 12.0
- In K2BAccordionMenu from version 15.2
|