RadEditor - Image Manager - Removing commands

4 posts, 1 answers
  1. Bader
    Bader avatar
    215 posts
    Member since:
    Aug 2008

    Posted 22 Jan 2012 Link to this post

    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 
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 23 Jan 2012 Link to this post

    Hello,

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

    Thanks,
    Princy.
  3. Answer
    Rumen
    Admin
    Rumen avatar
    14459 posts

    Posted 23 Jan 2012 Link to this post

    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
  4. Bader
    Bader avatar
    215 posts
    Member since:
    Aug 2008

    Posted 24 Jan 2012 Link to this post

    Hi,

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

    Regards,
    Bader
Back to Top