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

Delete Key

2 Answers 31 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 08 Oct 2014, 08:23 PM
We have the Filemanager on a screen and depending on the role the user is they will not be able to delete files.  I remove Delete from the toolbar and I also removed from the ContextMenu, but for some reason if the user clicks on file and hits the delete key they can still delete the file.

I tried to add  
    if (e.Command == "DeleteFile")
            e.Cancel = false;

to the OnItemCommand.  When I hit the delete key it will run through this logic but it still deletes the file.

2 Answers, 1 is accepted

Sort by
0
Frank
Top achievements
Rank 1
answered on 08 Oct 2014, 08:40 PM
I did find one way to disable it

RadFileExplorer1.KeyboardShortCuts.Delete = "";

Is there a better way?
0
Vessy
Telerik team
answered on 13 Oct 2014, 11:09 AM
Hello Frank,

The approach used by you is a good one and you can freely use it in your application. Actually, this is the approach I would suggest that you use in case you did not find it by yourself.

Regards,
Vessy
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
FileExplorer
Asked by
Frank
Top achievements
Rank 1
Answers by
Frank
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or