How to determine right click on node

3 posts, 0 answers
  1. M
    M avatar
    2 posts
    Member since:
    Oct 2008

    Posted 15 Oct 2008 Link to this post

    Hi, I am using the RadTree control and the RadMenu control to launch a right click menu from the tree. I would like to display an alert when the right click is not made on the tree, please advise if it's possible to capture the right click event for the RadMenu or any property where I can determine whether the right click was performed on the RadTree for the RadMenu or whether it was a random right click.
    Thanks alot!

    MJ
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Oct 2008 Link to this post

    Hi,

    Try the following javascript code to show an alert on right clicking the RadTreeview.

    JS:
     <script type="text/javascript" language="javascript" > 
       function OnClientClick(sender,eventArgs) 
        { 
          alert("You have Clicked:" + sender.get_id() ); 
        }  
      
    </script> 


    ASPX:
    <telerik:RadTreeView ID="RadTreeView1" OnClientContextMenuShowing="OnClientClick"  runat="server"
        <Nodes > 
           ...... 


    Thanks
    Shinu
  3. M
    M avatar
    2 posts
    Member since:
    Oct 2008

    Posted 16 Oct 2008 Link to this post

    Hi Shinu,
    Thanks a lot!
    However, I already have code that launches the right click alert - its in javascript on the document.oncontextmenu.
    What I'd like to accomplish is to disable the right click alert when I click on a radmenu item on the radtree.
    Please advise.
    Thanks!
    MJ
Back to Top