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

FileExplorer Error "NonExistingFolder"

5 Answers 57 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Iran
Top achievements
Rank 1
Iran asked on 12 Jun 2013, 09:57 PM
Hi i have this problem and you are my last choise, i explain you the scenary:
I use a FileExplore to let to user upload files to a Public Directory, i create the directory dinamically before the user work with the FileExplorer, the problem is that when the user has to work with the FileExplorer and Refresh it the file explorer change the path but thrown me an error called "NonExistingFolder", The implementation work fine but i don't want the error....
So the question is How avoid the error or how i do a best solution


To change the path dinamically i set it when a postback is called in the constructor of the page,

THANKS for helpme

5 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 17 Jun 2013, 02:30 PM
Hello Iran,

Could you verify, that you are resetting the paths of FileExplorer no later than Page_Load? I am asking you this because the Page_load is the latest moment of the page life-cycle when this can be done, and if you are doing it later this may cause many unexpected issues, like the experienced error.

If this is not the case, though, could you try to isolate the issue into a sample fully runnable project and send it for further investigation?

Regards,
Veselina Raykova
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.
0
Iran
Top achievements
Rank 1
answered on 17 Jun 2013, 08:32 PM
Thanks Veselina for reply my question. The only place where i reset the path is in the PageLoad(), i write it next the code for that you checked, if you don´t know the answer let me know and i send you a sample... Thanks again   

    private static string[] explorerPath;
    private static int editIndex;

    protected void Page_Load(object sender, EventArgs e)
    {
        RadFileExplorer1.Configuration.ContentProviderTypeName = typeof(WizardCustomProvider).AssemblyQualifiedName;

        if (!base.IsPostBack)
        {
. ...
}
        else
        {
            if (HPSceneManager.ActiveScene != null)  //My stuffs
            {
                RadFileExplorer1.TreeView.Nodes.Clear();

                explorerPath = new string[] { HPSceneManager.ActiveScene.VirtualFolderUbication };

                //explorerPath[0] = explorerPath[0].Replace("~", "/MapVista");
//The explorePath[0] is like "~/Public/Video0/"

                RadFileExplorer1.Configuration.ViewPaths = explorerPath;
                RadFileExplorer1.Configuration.UploadPaths = explorerPath;
                RadFileExplorer1.Configuration.DeletePaths = explorerPath;
                //RadFileExplorer1.InitialPath = explorerPath[0];
            }
        }

Well  like i said, this is the only place where i put the code that reset the FileExplorer path, let me know if you want to get the sample project... Thanks again

Lic. Iran Reyes Fleitas
Faculty of Mathematics and Computer. Havana University
0
Vessy
Telerik team
answered on 20 Jun 2013, 01:31 PM
Hi Iran,

The provided information indeed was not enough for me to replicate the issue and I will need to examine the mentioned sample project in order to be able to provide more to the point help. Please, ensure that the project is fully runnable and includes all the needed dependencies (like the used custom content provider).

Thank you in advance for your cooperation.

Regards,
Veselina Raykova
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.
0
Robert
Top achievements
Rank 1
answered on 29 Apr 2016, 07:04 PM

So you are saying there is no way to dynamically change the paths after postback.

 

Is there any way to send a client side message for the FileExporer to refresh it's control?

0
Marin Bratanov
Telerik team
answered on 03 May 2016, 02:52 PM

Hello Robert,

The provided path must point to a concrete file that is present in the currently shown file list (i.e., in the current folder). If you point the control to a folder that is not yet opened, it cannot navigate to the desired file, because the file list is obtained via a separate request only after the folder is shown to the client, so the control does not know whether the desired file exists yet.

If those conditions are met, setting the InitialPath will work in postback events like Button.Click as well. I will include this information in our documentation and I am also attaching here a short video that shows the expected behavior as a reference.

As for client-side methods—the control offers rich API: http://docs.telerik.com/devtools/aspnet-ajax/controls/fileexplorer/client-side-programming/overview. I believe you will find useful the refresh and set_currentDirectory methods interesting.

Regards,

Marin Bratanov
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Editor
Asked by
Iran
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Iran
Top achievements
Rank 1
Robert
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or