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

FileExplorer Bug?

1 Answer 93 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Adriana Stamat
Top achievements
Rank 1
Adriana Stamat asked on 16 Feb 2010, 05:29 PM
Hello, I have the latest FileExplorer version (trial).
I want to use a simple FileSystem explorer.
If I set the InitialPath, ViewPaths, UploadPaths, DeletePaths in code (c#), like this
--------------------------------------------------------------------------------

string

 

path = "~/Fisiere/";

 


RadFileExplorer1.Configuration.ContentProviderTypeName =

typeof(FileSystemContentProvider).AssemblyQualifiedName;

 

 

RadFileExplorer1.InitialPath = path;

RadFileExplorer1.Configuration.ViewPaths =

new string[] { path };

 

 

RadFileExplorer1.Configuration.UploadPaths =

new string[] { path };

 

 

RadFileExplorer1.Configuration.DeletePaths =

new string[] { path };

 

 

RadFileExplorer1.EnableOpenFile =

true;

 

 

RadFileExplorer1.EnableCopy =

true;

 

 

RadFileExplorer1.DisplayUpFolderItem =

true;

 

 

RadFileExplorer1.AllowPaging =

true;

 

 

RadFileExplorer1.EnableCreateNewFolder =

true;
-----------------------------------------------------------------------------------------
it doesn't work (I can't upload, delete, create folder)

but if I set these properties like this:
-----------------------------------------------------------------

 

 

 

<telerik:RadFileExplorer ID="RadFileExplorer1" Runat="server">

 

 

<Configuration ViewPaths="~/Fisiere/" UploadPaths="~/Fisiere/"

 

 

 

 DeletePaths="~/Fisiere/" /> </telerik:RadFileExplorer>

----------------------------------------------------

 

 

it works. I want to be able to set these properties in code (read from web.config)
Thank you.

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Fiko
Telerik team
answered on 19 Feb 2010, 01:13 PM
Hello Adriana,

We are aware of such a behavior in the current official release (2009.3 1314) and we already fixed it in the 2010 Q1 (still BETA) version of the control. The problem is caused by the fact that the InitialPath is set before setting the ViewPaths, DeletePaths and UploadPaths properties. The problem can be easily avoided by setting the InitialPath property later in the code as shown bellow:
protected void Page_Load(object sender, EventArgs e)
{
    string path = "~/Root/";
    RadFileExplorer1.Configuration.ContentProviderTypeName = typeof(FileSystemContentProvider).AssemblyQualifiedName;
  // Original code: RadFileExplorer1.InitialPath = path;
    RadFileExplorer1.Configuration.ViewPaths = new string[] { path };
    RadFileExplorer1.Configuration.UploadPaths = new string[] { path };
    RadFileExplorer1.Configuration.DeletePaths = new string[] { path };
        
  // Moved here:
    RadFileExplorer1.InitialPath = path;
}

I hope this helps.

All the best,
Fiko
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
Adriana Stamat
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or