We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to refresh Tree or Remove/Change Current Folder Selection

Thread ID:

Created:

Updated:

Platform:

Replies:

129410 Mar 16,2017 06:07 AM Mar 17,2017 12:10 PM JavaScript 1
loading
Tags: ejFileExplorer
SAGAR
Asked On March 16, 2017 06:20 AM


i have work on java script api file explorer in asp.net mvc when i select folder and it containing single file when i have remove file and folder from c# code 
and refresh file explorer using fileExplorerObj.refresh(); method it gives an error message System.IO.DirectoryNotFoundException.

i want refresh the tree and display only available folder in the root directory

as well as change selection of folder from jquery

please revert back asap.


Ashokkumar Balasubramanian [Syncfusion]
Replied On March 17, 2017 12:10 PM

Hi Sagar, 
 
We have analyzed your query (“How to refresh Tree or Remove/Change Current Folder Selection”). We suspect that, the reported issue occurs due to handle the deletion and refresh operions in same Folder Location. So please use the below code snippet to resolve this issue. 
 
[Script] 
 
$.ajax({ 
            url: '@Url.Action("Remove", "FileExplorer")', 
            type: "POST", 
            dataType: "json", 
            data: { Name: value, path: args.path }, 
            success: function (data) { 
                var fileObj = $("#fileexplorer").ejFileExplorer("instance"); 
                fileObj.option("selectedFolder", data); //Pass the parent folder 
                fileObj.refresh(); 
            } 
        }); 
 
For your requirement, we have prepared simple sample, it can be downloaded in below location. 
 
 
Please let us know, if you have any other concerns, 
 
Regards, 
Ashokkumar B. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;