FileBrowserContentProvider for Xml. How to specify Xml file name?

2 posts, 0 answers
  1. Bob van der Zinch
    Bob van der Zinch avatar
    10 posts
    Member since:
    Feb 2010

    Posted 16 Mar 2010 Link to this post


    I'm now trying to display some xml content in FileExplorer using my own FileBrowserContentProvider. Actually, I'm developing ascx over FileExplorer to display different types of Xml in there. But I don't see how to specify Xml file name for the provider.

    I tried to use ViewPath property of FileExplorer.Configuration like this: D:\PathToMyXmlFile\XmlFileName.xml/XPath. It works, I mean inside provider I can parse it and build tree properly, but the whole path is displayed in address field, that is pretty much inconsistent.

    I would like to pass Xml filename and XPath to the provider, but since it's created internally, there's no way to pass any other information in there besides FileExplorer.Configuration, but the configuration lacks custom fields. I guess I can use DeletePaths property for that, since security is provided by the provider anyway, but it's quite inconvinient.

    In addition... Probably I'm missing something, but... I set RadFileExplorer.EnableCreateNewFolder to true, my provider returns true in CanCreateDirectory, but I don't see the new folder button...
  2. Dobromir
    Dobromir avatar
    1633 posts

    Posted 19 Mar 2010 Link to this post

    Hi Bob,

    I just answered your support ticket on the same subject. For convenience I will paste my reply below:

    I am not quite sure I understand your scenario correctly. Could you please provide a simple project that we can examine? If you are trying to list only XML files in RadFileExplorer you can find detailed explanation on how to filter the displayed files in this KB article.

    Regarding your second question, here are the description of the two properties:
    Location - The location of the directory item. To let the FileBrowser control automatically build its path you should set this parameter to string.Empty. If the DirectoryItem is a root item, this parameter must contain the virtual location of the item.
    FullPath - The full virtual path of the directory item. Used by the ContentProvider for populating the Directories and Files properties.

    In order to provide the requested functionality regarding the path displayed in the address bar you need to implement a mapping logic in the file handler. I believe the following KB article will be useful for you:
    Use RadFileExplorer with physical and shared folder's paths

    About the question in your second post, please make sure that you have upload permission to the specific folder - directories with such permissions are the ones applied to the UploadPaths properties and their sub-folders. If you specific rights are not given to a folder the corresponding buttons are not rendered.

    Sincerely yours,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft R3 2016 release webinar banner
Back to Top