This is a migrated thread and some comments may be shown as answers.

documentation for OnClientContextMenuShowing in Tree view?

2 Answers 59 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 10 Jul 2009, 04:17 PM
I am trying to enable/disable some (treeview) context menu items when a user tries to open the menu but I struggle to find documentation showing the actual method/properties to use.

The documentation about OnClientShowing shows this code

<script type="text/javascript"
  function showContextMenu(menu, args) 
  {              
     var target = args.get_targetElement(); 
     if (target) 
     { 
        if (target.value == "") 
        args.set_cancel(true); 
     else 
        menu.get_items().getItem(1).disable(); 
     } 
}</script> 
<telerik:RadContextMenu 
   ID="RadContextMenu1" runat="server" 
   OnClientShowing="showContextMenu"
 <Items> 
   ... 
 </Items> 
</telerik:RadContextMenu>  

but when I try it it blows up and it looks like I should call args.get_menu()...

Any idea where I can find the right documentation please?

I use 2009 Q1

Regards

Eric






2 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 10 Jul 2009, 04:26 PM
Hi Eric,

I think you are looking at the wrong event. Perhaps you need this help article.

Regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Eric
Top achievements
Rank 1
answered on 11 Jul 2009, 09:19 AM
Brilliant!

It also gave me access to the objects documentation that I was hoping for.


Many Thanks


Eric
Tags
Menu
Asked by
Eric
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Eric
Top achievements
Rank 1
Share this question
or