Delete Key

3 posts, 0 answers
  1. Frank
    Frank avatar
    86 posts
    Member since:
    Mar 2012

    Posted 08 Oct 2014 Link to this post

    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. Frank
    Frank avatar
    86 posts
    Member since:
    Mar 2012

    Posted 08 Oct 2014 Link to this post

    I did find one way to disable it

    RadFileExplorer1.KeyboardShortCuts.Delete = "";

    Is there a better way?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vessy
    Admin
    Vessy avatar
    1382 posts

    Posted 13 Oct 2014 Link to this post

    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.

     
Back to Top