0

I am trying to use a kendo ui contextMenu on kendo ui listView items but it does work , and there is no error.

//The ListView HTML
<div id="listView"></div>
<div id="pager" class="k-pager-wrap"></div>

 <script type="text/x-kendo-template" id="template">
        <div class="document">
            <img width="65px" height="65px" src="../Content/extensionsIcon/#=FileExtension#.png" alt="#: DocTitle #" />
            <h5>#:DocTitle#</h5>
        </div>
    </script>

 //The ContextMenu HTML 
 <ul id="context-menu">
<li id="download">Download</li>
<li id="remove">Remove</li>
</ul>


 $("#context-menu").kendoContextMenu({
    target: "#listView .document",
    select: function (e) {

    }
});
Haytham
  • 834
  • 1
  • 12
  • 31

1 Answers1

1

Refer to the context menu demo. You should use the filter property of context menu.

      $("#context-menu").kendoContextMenu({
                    target: "#listView",
                    filter: ".document",                    
                    select: function(e) {
                        // Do something on select
                    }
       });