Intersoft Support Center

Create Template Menu Item

WebMenuBar provides Template type that can be used to place other controls.

This topic will show you how to create Template menu item.

To create Template menu item

  1. Attach ContextMenu to a control.
  2. In WebMenuItem Collection Editor, select mnuContextMenu2. Select Items and click the collection button.
  3. Create one menu item named mnuContextMenuTemplate and set Type to Template.
  4. Right click on WebContextMenu and choose Edit Template >> Items.
  5. In mnuContextMenuTemplateItem, drag any control you want to use. In this case, WebCombo control is used and bound to Customers table using AccessDataSource control.
  6. Right click on the template page and choose End Template Editing to apply the settings.
  7. Go to WebContextMenu's Properties. Expand MenuStyleSettings and set MenuWindowType to Normal.
  8. Run the project. Right click on the button and point your mouse to ContextMenu2. The sub menu item is using template type which contains WebCombo control.
Previous Next