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

Disabling contextmenu on a certain folder/file

1 Answer 57 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Claude
Top achievements
Rank 1
Claude asked on 16 Nov 2010, 11:12 AM
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.

Regards,
Claude

1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 19 Nov 2010, 09:53 AM
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)
    {
        args.set_cancel(true);
    }
    function OnGridContextShowing(oMenu, args)
    {
        args.set_cancel(true);
    }
I hope this helps.


Kind regards,
Fiko
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.
Tags
FileExplorer
Asked by
Claude
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or