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

RadEditor - Image Manager - Removing commands

3 Answers 286 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Bader
Top achievements
Rank 1
Bader asked on 22 Jan 2012, 11:25 AM
Hi,

I'm wonder how to remove commnads and the path from the RadEditor Image Manager window (Every thing that is selected in Red in the attcahed screen-shot).

Please, I need your help,

Regards,
Bader 

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Jan 2012, 01:36 PM
Hello,

Try the following CSS.
CSS:
.RadFileExplorer .RadToolBar .icnDelete .rtbText,.RadFileExplorer .RadToolBar .icnNewFolder .rtbText
  {
    display:none !important;
  }

Thanks,
Princy.
0
Accepted
Rumen
Telerik team
answered on 23 Jan 2012, 03:52 PM
Hello,

You can disable the Delete option by not setting the DeletePaths property of the Image Manager, e.g.

< telerik:RadEditor ID="RadEditor1" Runat="server">
<ImageManager ViewPaths="~/" UploadPaths="~/" />
< /telerik:RadEditor>

RadEditor is using RadFileExplorer control for its file browser dialogs and it does not offer the possibility to isolate Rename functionality.
It is possible to hide / remove Rename from the context menus with the following approaches:
  1. Register the external dialogs files and disable context menus at all by modifying the VisibleControls collection of RadFileExplorer declaration in the FileBrowser.ascx, e.g:
    Copy Code
    <telerik:RadFileExplorer ID="RadFileExplorer1" Height="410px" Width="400px" TreePaneWidth="150px"
    runat="Server" EnableOpenFile="false" AllowPaging="true" VisibleControls="TreeView,Toolbar,Grid,AddressBox"/>
  2. Remove just the Rename element from the context menu. Information how to achieve this is available in the following articles / forum posts:
    http://www.telerik.com/community/forums/aspnet-ajax/file-explorer/disable-the-rename-option.aspx
    http://www.telerik.com/support/kb/aspnet-ajax/fileexplorer/remove-delete-and-upload-commands.aspx

    To get a reference to RafFileExplorer in the built-in dialogs see the solution provided in this KB article: Displaying single upload control in the FileBrowser Upload manager.
  3. To hide the new folder button set

    <telerik:RadFileExplorer EnableCreateNewFolder="false" 

For your convenience I prepared a sample project which demonstrates how to obtain a reference to RadFileExplorer inside the FileBrowser dialogs and disable the Rename context menu item. By not specifying the DeletePaths property the Delete button was also not rendered on the toolbar.



All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Bader
Top achievements
Rank 1
answered on 24 Jan 2012, 10:15 AM
Hi,

Thank you very much for your help,
It is working as it should be,

Regards,
Bader
Tags
Editor
Asked by
Bader
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Rumen
Telerik team
Bader
Top achievements
Rank 1
Share this question
or