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

RadFileExplorer Delete File In Subfolder causes folder directory to reset

1 Answer 96 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 30 Jun 2013, 08:38 PM
Running three file explorers in the three separate tabs Each on has it's on initial directory set.  I have view, upload and delete folders set.  The problem I am experiencing is that when I delete a file from a sub folder when the control refreshes the display shows the parent directory again instead of the subdirectory being selected.  I went through the help section but couldn't see anything on keeping subdirectories open on delete.  I figure it will be in the Item_command section for "DeleteFile" but I can't see where to hook the changes. 

Here's my code for one of the exploreres:
Page Code:
<telerik:RadFileExplorer runat="server" ID="ImagesExplorer" Width="99%" Height="500px">
</telerik:RadFileExplorer>
Code Behind:
    private string baseImagePath
    {
        get
        {
            return String.Format("/userfiles/images/{0}/", ThisSiteName);
        }
    }
 
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
 
        string[] imagePath = { baseImagePath };
        ImagesExplorer.EnableOpenFile = true;
        ImagesExplorer.ExplorerMode = Telerik.Web.UI.FileExplorer.FileExplorerMode.Default;
        ImagesExplorer.Configuration.ViewPaths = imagePath;
        ImagesExplorer.Configuration.DeletePaths = imagePath;
        ImagesExplorer.Configuration.UploadPaths = imagePath;
        ImagesExplorer.OnClientFileOpen = "OnClientFileOpen";
        ImagesExplorer.Configuration.MaxUploadFileSize = 500000000;
}
 
    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        if (!IsPostBack)
        {
            ImagesExplorer.InitialPath = baseImagePath;
        }
    }

1 Answer, 1 is accepted

Sort by
0
Misho
Telerik team
answered on 03 Jul 2013, 02:13 PM
Hi,

I've tried to replicate the unwanted behavior you are experiencing but no avail. I'm attaching a sample page with a scenario similar to yours where you could test. I would advise you at this point to revise your project and if the issue still occurs please try to isolate it in a simple, fully runnable project or modify the sample test project I've attached according to your configuration which will allow us to examine it locally on our side.

Looking forward to your reply.

Regards,
Misho
Telerik
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 the blog feed now.
Tags
FileExplorer
Asked by
Kevin
Top achievements
Rank 1
Answers by
Misho
Telerik team
Share this question
or