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

FileBrowserContentProvider for Xml. How to specify Xml file name?

1 Answer 56 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Bob van der Zinch
Top achievements
Rank 2
Bob van der Zinch asked on 16 Mar 2010, 06:00 PM
Hi,

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...
 
Cheerz,
  Bob

1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 19 Mar 2010, 03:34 PM
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,
Dobromir
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.
Tags
FileExplorer
Asked by
Bob van der Zinch
Top achievements
Rank 2
Answers by
Dobromir
Telerik team
Share this question
or