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

LinkManager -> use Document Manager button to show all files instead of only documents

3 Answers 71 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Rick Langevoort
Top achievements
Rank 1
Rick Langevoort asked on 05 Jan 2011, 01:15 AM
Hi, I have a radeditor with a few buttons; media, document manager, images, link manager etc.

To add a link to my document I fire up the linkmanager and then I want to browse the server for a file. This is not necessarily a document, can be anything; images, media files, documents, html files etc. However, given that the button on the link manager is the document manager and it is also shared with the document manager button in the main editor itself, it only shows me documents that I specified should be shown with the document manager (word, excel, pdf etc). So, how can I make sure that the link manager shows me all files, yet the editor itself only shows me documents when I click the document manager button in the editor itslef?

Thanks,
Rick

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 05 Jan 2011, 10:22 AM
Hello Rick,

The Document manager on the editor's toolbar and in the link manager dialog are the same control and if you configure one of them to show all files then the other will also show all files.
You can enable all file types to be shown in the Document manager by setting the SearchPatterns="*.*" property, e.g.

<telerik:RadEditor ID="RadEditor1" runat="server">
        <DocumentManager ViewPaths="~/" UploadPaths="~/" SearchPatterns="*.*" />
</telerik:RadEditor>

Kind regards,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Rick Langevoort
Top achievements
Rank 1
answered on 05 Jan 2011, 01:50 PM
Yes, I know.... and that's exactly what I do NOT want. I need the document manager in the editor to just show documents, but I want the linkmanager to be able to chose from every filetype available on the server. It doesn't seem very logical that I can't link to any other files than documents OR that the regular document manager in the editor would show other file types than just documents.

So the question is, how can I get the linkmanager to work independently? I don;t care if I need to inherit from the linkmanager and create my own button to show a file manager that shows all file types, but I need to know if that's possible and how that would be possible?

Thanks,
Rick
0
Rumen
Telerik team
answered on 06 Jan 2011, 11:39 AM
Hello Rick,

Thank you for the detailed explanation.

Yes, it is possible to achieve your scenario. Just hide the toolbar Document manager button and create your own custom Document Manager dialog which uses RadFileExplorer in it.

Here is how to remove the Document Manager from the toolbar:

protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        RadEditor1.EnsureToolsFileLoaded();
    }
}
public void RemoveButton(string name)
{
    foreach (Telerik.Web.UI.EditorToolGroup group in RadEditor1.Tools)
    {
        EditorTool tool = group.FindTool(name);
        if (tool != null)
        {
            group.Tools.Remove(tool);
        }
    }
}



Best regards,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Editor
Asked by
Rick Langevoort
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Rick Langevoort
Top achievements
Rank 1
Share this question
or