New to Telerik UI for ASP.NET MVC? Download free 30-day trial

ContextMenuTagHelper

Example

<kendo-contextmenu>
    <hierarchical-datasource></hierarchical-datasource>
    <items></items>
    <li></li>
    <popup-animation></popup-animation>
    <scrollable />
</kendo-contextmenu>

ChildTags

Tag Name Details
hierarchical-datasource HierarchicalDataSourceTagHelper
items MenuItemsTagHelper
li
popup-animation ContextMenuAnimationSettingsTagHelper
scrollable ContextMenuScrollableSettingsTagHelper

Attributes

Attribute Type Description
name String Sets the name of the component.
data-image-url-field String Sets the field of the data item that provides the image url of the ContextMenu items.
deferred Boolean Suppress initialization script rendering. Note that this options should be used in conjunction with DeferredScripts method.
is-in-client-template Boolean When placing a Tag Helper within a Kendo Template, set the type to text/html and add the is-in-client-template="true" attribute.
align-to-anchor Boolean Specifies that ContextMenu should be shown aligned to the target or the filter element if specified.
append-to String The DOM element to which the ContextMenu will be appended. The element needs to be relatively positioned.
as-module Boolean
close-on-click Boolean Specifies that sub menus should close after item selection (provided they won't navigate).
copy-anchor-styles Boolean Copies and uses the styles from the anchor.
data-content-field String Sets the field of the data item that provides the content of the ContextMenu items.
data-source-id String The Id of the data source.
data-sprite-css-class-field String Sets the field of the data item that provides the sprite css class of the ContextMenu items.
data-text-field String Sets the field of the data item that provides the text of the ContextMenu items.
data-url-field String Sets the field of the data item that provides the url of the ContextMenu items.
direction ContextMenuDirection Represents the menu item opening direction.
filter String Specifies ContextMenu filter selector - the ContextMenu will only be shown on items that satisfy the provided selector.
has-client-component Boolean
hover-delay Double Specifies the delay in ms before the sub menus are opened/closed - used to avoid accidental closure on leaving.
on-activate String Fires when a sub menu or the ContextMenu gets opened and its animation finished.
on-close String Fires before a sub menu or the ContextMenu gets closed. You can cancel this event to prevent closure.
on-data-bound String Fires when the ContextMenu is bound to the set DataSource.
on-deactivate String Fires when a sub menu or the ContextMenu gets closed and its animation finished.
on-open String Fires before a sub menu or the ContextMenu gets opened. You can cancel this event to prevent opening the sub menu.
on-select String Fires when a menu item gets selected.
orientation ContextMenuOrientation Specifies the orientation in which the menu items will be ordered
popup-collision String Specifies how ContextMenu should adjust to screen boundaries. By default the strategy is "fit" for a sub menu with a horizontal parent or the root menu, meaning it will move to fit in screen boundaries in all directions, and "fit flip" for a sub menu with vertical parent, meaning it will fit vertically and flip over its parent horizontally. You can also switch off the screen boundary detection completely if you set the popupCollision to false.
sanitize-id Boolean
script-attributes IDictionary<String,Object>
security-trimming Boolean
show-on String Specifies the event or events on which ContextMenu should open. By default ContextMenu will show on contextmenu event on desktop and hold event on touch devices. Could be any pointer/mouse/touch event, also several, separated by spaces.
target String Specifies the element on which ContextMenu should open. The default element is the document body.
In this article
Not finding the help you need?