RadEditor displays Folders but not the files

4 posts, 0 answers
  1. Ryan C
    Ryan C avatar
    28 posts
    Member since:
    Aug 2009

    Posted 08 May 2013 Link to this post

    I had the need to connect an instance of my RadEditor and RadFileManager to a file source on  an FTP, and I used the sample provided on - http://www.telerik.com/community/forums/aspnet-ajax/file-explorer/how-to-use-the-ftp-connection.aspx

    The RadFileManager works flawlessly, however the RadEditor shows the folders and sub folders, but does not show the files. Note that the editor still manages to upload a file, however still doesn't show it.      

    My behind code:
    protected void Page_Load(object sender, EventArgs e)
    {
      string[] paths = new string[] { "/Files" };
      txtContentEN.DocumentManager.ContentProviderTypeName = typeof(FtpContentProvider).AssemblyQualifiedName;
      txtContentEN.DocumentManager.ViewPaths = paths;
      txtContentEN.DocumentManager.DeletePaths = paths;
      txtContentEN.DocumentManager.UploadPaths = paths;
    }

    I tried adding the line below, but still no luck.

    txtContentEN.DocumentManager.SearchPatterns = new string[] { "*.docx", "*.doc", "*.rtf", "*.txt", "*.pdf", "*.xls", "*.xslx", "*.ppt", "*.pptx", "*.pps" };

  2. Vessy
    Admin
    Vessy avatar
    1986 posts

    Posted 10 May 2013 Link to this post

    Hi Ryan,

    The file filters passed to the SearchPatterns property cannot contain wildcards. The filtering is performed only by file extension, so if you want to specify exact file types, the SearchPatterns should be configured as follows:
    txtContentEN.Configuration.SearchPatterns = new string[] { "docx", "doc", "rtf", "txt", "pdf", "xls", "xslx", "ppt", "pptx", "pps" };

    Kind regards,
    Veselina Raykova
    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.
  3. Ryan C
    Ryan C avatar
    28 posts
    Member since:
    Aug 2009

    Posted 13 May 2013 Link to this post

    Thanks that did the trick :)
  4. Ryan C
    Ryan C avatar
    28 posts
    Member since:
    Aug 2009

    Posted 15 May 2013 Link to this post

    Please note that I had to include this search pattern, otherwise it will not allow me to upload.
    SearchPatterns="doc,docx,rtf,txt,pdf,xls,xslx,ppt,pptx,*.doc,*.docx,*.rtf,*.txt,*.pdf,*.xls,*.xslx,*.ppt,*.pptx"


    And when I select a file from teh document manager in the text editor, the link comes with a prefix - 
    FtpFileSystemHandler_Cs.ashx?path=
Back to Top