Disabling contextmenu on a certain folder/file

2 posts, 0 answers
  1. Claude
    Claude avatar
    9 posts
    Member since:
    May 2010

    Posted 16 Nov 2010 Link to this post

    Hie everyone,

    I have a project with different permissions. I would like to disable contextmenu on a certain folder based on the permissions. I have tried using OnClientItemSelected to no avail. Any assistance will be greatly appreciated.

  2. Fiko
    Fiko avatar
    1406 posts

    Posted 19 Nov 2010 Link to this post

    Hi Claude,

    You can cancel the menus by attaching handlers to the corresponding RadMenu controls (for the RadGrid and RadTreeView) and then cancel the menu using args.set_cancel(true) method
    1. Attach the handlers in codebehind:
      RadFileExplorer1.TreeView.OnClientContextMenuShowing = "OnClientContextMenuShowing";
      RadFileExplorer1.GridContextMenu.OnClientShowing = "OnGridContextShowing";
    2. Cancel the context menus:
      function OnClientContextMenuShowing(oTreeView, args)
      function OnGridContextShowing(oMenu, args)
    I hope this helps.

    Kind regards,
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top