Prohibition of new folder creation

9 posts, 2 answers
  1. Helen
    Helen avatar
    10 posts
    Member since:
    Jun 2009

    Posted 02 Jul 2009 Link to this post

    Hi!
    I use myDbProvider for ImageManager. The user can delete and load files.
    I need to be forbidden folder creation in ImageManager. How can I do it?
  2. Answer
    Rumen
    Admin
    Rumen avatar
    12849 posts

    Posted 07 Jul 2009 Link to this post

    Hi Helen,

    You can hide the New Folder button in the File Browser dialogs by registering the external dialogs files of RadEditor and setting the class below in the \RadControls\Editor\Controls\FileBrowser.ascx file:

       <style type="text/css">
        .icnNewFolder { display:none !important; }
        </style>

    To see the change, save the file and refresh the page with the editor.

    Sincerely yours,
    Rumen
    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. Helen
    Helen avatar
    10 posts
    Member since:
    Jun 2009

    Posted 22 Jul 2009 Link to this post

    Hi, Rumen!  Thanks for your answer. But my problem is not solved completely. When I right button click on image or directory, that menu is displayed. This menu contains item "New folder". How can I hide this item in menu?
  5. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 24 Jul 2009 Link to this post

    Hi Helen,

    To remove the new folder functionality completely, you need to add one property to the RadFileExplorer control, which is in the FileBrowser.ascx file:

    <telerik:RadFileExplorer ID="RadFileExplorer1" Height="410px" Width="400px" TreePaneWidth="150px" EnableCreateNewFolder="false" ...

    By setting EnableCreateNewFolder to false, you will hide the context menu items as well as the toolbar button.

    Regards,
    Lini
    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.
  6. Helen
    Helen avatar
    10 posts
    Member since:
    Jun 2009

    Posted 24 Jul 2009 Link to this post

    Hi, Lini! Is true for RadFileExplorer/ But i have problem with ImageManager in RadEditor. ImageManager hasn't property EnableCreateNewFolder.
  7. Answer
    Lini
    Admin
    Lini avatar
    2144 posts

    Posted 27 Jul 2009 Link to this post

    Hello,

    The editor's image manager and all other file manager dialogs use the RadFileExplorer control in them to show the files/folders. What you need to do is change the editor dialogs and disable the new folder option in the RadFileExplorer control there. To do this, you need to load the browsing control of the editor dialogs from an external file and add the property there. My colleague Rumen already gave you a link that explains how to use the editor's ExternalDialogsPath property to load a dialog from an external file. The file you need to load and change is called FileBrowser.ascx and it is located in the EditorDialogs folder of the RadControls installation. Inside you will find the RadFileExplorer control and you can add the EnableCreateNewFolder property.

    All the best,
    Lini
    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.
  8. Helen
    Helen avatar
    10 posts
    Member since:
    Jun 2009

    Posted 27 Jul 2009 Link to this post

    Thanks for your fully answer.

  9. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 22 Feb 2010 Link to this post

    Hi,

    Are these properties also accessible from codebehind like:

    RadEditor1.ImageManager.RadFileExplorer1.TreeView.EnableDragAndDrop = false
    RadEditor1.ImageManager.RadFileExplorer1.Grid.ClientSettings.AllowRowsDragDrop = false
    I cannot get this to work...

    Regards,
    Marc


  10. Rumen
    Admin
    Rumen avatar
    12849 posts

    Posted 24 Feb 2010 Link to this post

    Hi Marc,

    It is not possible to access the RadFileExplorer control via the codebehind  of the file where RadEditor resides. You should register the external RadEditor dialogs and edit the FileBrowser.ascx file.

    Best regards,
    Rumen
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017