documentation for OnClientContextMenuShowing in Tree view?

3 posts, 1 answers
  1. Eric
    Eric avatar
    82 posts
    Member since:
    Feb 2009

    Posted 10 Jul 2009 Link to this post

    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. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 10 Jul 2009 Link to this post

    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.
  3. Eric
    Eric avatar
    82 posts
    Member since:
    Feb 2009

    Posted 11 Jul 2009 Link to this post

    Brilliant!

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


    Many Thanks


    Eric
Back to Top