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

Prohibition of new folder creation

8 Answers 170 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Helen
Top achievements
Rank 1
Helen asked on 02 Jul 2009, 06:39 AM
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?

8 Answers, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 07 Jul 2009, 01:20 PM
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.
0
Helen
Top achievements
Rank 1
answered on 22 Jul 2009, 07:36 AM
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?
0
Lini
Telerik team
answered on 24 Jul 2009, 12:06 PM
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.
0
Helen
Top achievements
Rank 1
answered on 24 Jul 2009, 02:58 PM
Hi, Lini! Is true for RadFileExplorer/ But i have problem with ImageManager in RadEditor. ImageManager hasn't property EnableCreateNewFolder.
0
Accepted
Lini
Telerik team
answered on 27 Jul 2009, 06:53 AM
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.
0
Helen
Top achievements
Rank 1
answered on 27 Jul 2009, 02:31 PM

Thanks for your fully answer.

0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 22 Feb 2010, 08:02 AM
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


0
Rumen
Telerik team
answered on 24 Feb 2010, 02:49 PM
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.
Tags
Editor
Asked by
Helen
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Helen
Top achievements
Rank 1
Lini
Telerik team
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or