remove

Removes a specified item(s) from a ContextMenu.

Example

<div id="target">Target</div>
<ul id="context-menu">
    <li id="Item1">Item 1
        <ul>
            <li>Sub Item 1</li>
            <li>Sub Item 2</li>
            <li>Sub Item 3</li>
        </ul>
    </li>
    <li>Item 2
        <ul>
            <li>Sub Item 1</li>
            <li>Sub Item 2</li>
            <li>Sub Item 3</li>
        </ul>
    </li>
</ul>
<script>
    // initialize the ContextMenu
    $("#context-menu").kendoContextMenu({
        target: "#target"
    });
    // get a reference to the ContextMenu widget
    var contextMenu = $("#context-menu").data("kendoContextMenu");
    // remove the item with the id "Item1"
    contextMenu.remove("#Item1");
</script>

Parameters

element String|Element|jQuery

Target item selector.

Returns

kendo.ui.ContextMenu Returns the ContextMenu object to support chaining.

In this article