can you please give me a hint (or better some code example *g*) how to remove elements like the foldertree, the url-field and the button to create new folders (as you can see on the screenshot I attached)?
I know how to remove those elements from the FileExplorer but the ImageManager seems to be another component than the FileExplorer but with a similar look.
Thank you very much!
Greetings from Germany.
Ricky Mattischeck
4 Answers, 1 is accepted
ImageManager, and all the file managers actually , are using RadFileExplorer control to provide file exploring.
In order to remove a specific element from the dialog you have to create a custom dialog with custom definition of RadFileExplorer or use the ExternalDialogsPath property to provide path to modified dialogs.
RadFileExplorer is defined in FileExplorer.ascx you should locate the following part of the code and modify the VisibleControls property with the required fields:
<telerik:RadFileExplorer ID="RadFileExplorer1" Height="410px" Width="400px" TreePaneWidth="150px" runat="Server" EnableOpenFile="false" AllowPaging="true" VisibleControls="Grid,Toolbar" /> Information regarding CustomDialogs and ExternalDialogPath is available in the following articles:
ExternalDialogsPath Property / Customize Built-in Dialogs
Add Custom Dialogs / Add Custom Dialogs(demo)
Custom FileBrowserContent Provider
RadFileExplorer does not provide the functionality to remove a specific button from the toolbar out-of-the-box, however, this is achievable by 'hiding' the button with CSS. Use the following code do so :
<style type="text/css"> .icnNewFolder { display:none !important; } </style>Note that this CSS solution is considered a 'hack' and might not work with future versions of the control.
All the best,
Dobromir
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
thanks for the fast reply and the link to the articles. The first one "ExternalDialogsPath property" did it!
For your second advice, I found another solution which is a better one than a css-hack I think :-)
As if you can set the VisibleControls-property on <telerik:RadFileExplorer>-tag in FileBrowser.ascx, why not also set the EnableCreateNewFolder-property to false?
So my piece of code would look like this:
<telerik:RadFileExplorer ID="RadFileExplorer1" Height="410px" Width="400px" TreePaneWidth="150px" runat="Server" EnableOpenFile="false" AllowPaging="true" EnableCreateNewFolder="false" VisibleControls="Grid,Toolbar" /> Greetings,
Ricky
Please, accept my sincere apologies for not suggesting to use the mentioned property - indeed, this is a better approach. However, there are no such properties for all the buttons in the RadFileExplorer control and thus I believe that the CSS technique might be useful in similar cases when there is no a property exposed.
For this particular case, I recommend to stick to the solution you have found.
Greetings,
Dobromir
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
But maybe you can help me with a next question, that goes in the same direction like my first... I created a new thread here