New to Kendo UI for Angular? Start a free 30-day trial
Target
The target
input of the ContextMenu defines the item for which the component will open.
Configuration
You can set target
to any of the following values:
- A DOM element reference.
- A CSS selector string that matches the target element.
- An
ElementRef
class. - A
kendoContextMenuTargetContainer
directive instance.
Change Theme
Theme
Loading ...
Filtering the Targets
You can filter the targets within a container for which the ContextMenu will open.
- Set the
target
input to the container element. - Set the
filter
property to a CSS selector which matches the elements for which the ContextMenu will open.
Change Theme
Theme
Loading ...
Changing Items for Specific Targets
Depending on the filtered target elements, you can change the items that are shown in the ContextMenu by using the popupOpen
event.
Change Theme
Theme
Loading ...
Directives
The ContextMenu allows you to associate its target elements with data by using its kendoContextMenuTargetContainer
and kendoContextMenuTarget
directives.
- Set
kendoContextMenuTargetContainer
to theroot
element. - Pass the directive to the
target
input of the ContextMenu.
You have to set the
kendoContextMenuTarget
directives to the specific elements within the container for which the ContextMenu will open.
Change Theme
Theme
Loading ...