Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7896359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:52:34+00:00 2026-06-03T07:52:34+00:00

I have a treeview and I wanted to add right click support for the

  • 0

I have a treeview and I wanted to add right click support for the different items. This is how I did it:

http://jsfiddle.net/doonot/xWjSz/

The menu is shown only for the first root module (after right click), but not for the rest of the root modules. Can you tell me what I have to change, in order to get the menu for all root modules?

Thanks a lot, I much appreciate your answer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:52:35+00:00Added an answer on June 3, 2026 at 7:52 am

    Hiya Please see this demo http://jsfiddle.net/hYJPv/1/ or http://jsfiddle.net/hYJPv/ (Fixed the issue) or diff approach here http://jsfiddle.net/UeqBk/for_Dooonot_from_Tats_innit/

    on rightclick you will get an alert.

    code

    $(document).ready(function()
    {
        // If you want to disable showing the context menu when right clicking
        // on the document, the code below would do the trick.
        $(document).bind("contextmenu",function(e)
        {
            alert('right click capture');
            return false;
        }); 
    
        var $tree = $("#tree").kendoTreeView(
        {
            select: function (event)
            {
                var $item = $(event.node);
                console.log( $item );
                alert( "selected" );
            }
        });
    
    
        // Find the item you want to select...
        var $selected = $('#selected');
        var $treePath = $selected.parentsUntil($tree, "li");
    
        var treeView = $tree.data('kendoTreeView');
    
        // Expand the tree in order to show the selected item
        treeView.expand( $treePath );
    
        // Gotta make both calls...
        treeView.select( $selected );
        treeView.trigger( 'select', {node: $selected} );
    });
    ​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have listed data for ASP.net control TreeView. I wanted to disable a particular
I have a TreeView setup so that each TreeViewItem has right-click context menu applied
I have a treeview (winforms) which have different item types on it. I have
I am trying to create a treeview dynamically using c# and asp.net. I have
I have a page that uses a TreeView control from ComponentArt. If I add
I have a treeview with several items in it. How do I force the
I have a TreeView control in my WinForms .NET application that has multiple levels
I have a treeview with nodes like this: Foo (1234), and want to allow
I have a treeView displayed on a winform.Now when i click on an xmlnode
I have a Treeview which is doing lazy loading. I used MVVM. I wanted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.