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. Image for the cookie policy date

How to refresh file explorer after deleting file.

After deleting file in file explorer, I used following code

fileExplorerObj = $("#fileExplorer1").data("ejFileExplorer"); fileExplorerObj.refresh();

but it is not refreshed, the file remains visible and after refreshing browser, it removed and deleted from the file system.
So how I can refresh file explorer and remove that file after deletion.

5 Replies

AB Ashokkumar Balasubramanian Syncfusion Team May 11, 2017 01:09 PM UTC

Hi Samar, 
We have checked the reported problem, but we are unable to reproduce it. In our FileExplorer component when we delete the file on it, it will automatically refresh the UI also and no need to refresh manually. 
In case when the file was deleted from the file system dynamically, at that time we can call the refresh method as you mentioned in your code block, to refresh the UI. 
So could you please provide some additional details with your application scenario to reproduce the issue in our side. Also let us know whether you are using any sample level customization with FileExplorer. This would be more helpful for us to provide better solution at the earliest. 
Otherwise, are you expecting the similar requirement from the below forum? 
Ashokkumar B.  

SA Samar May 11, 2017 01:57 PM UTC

We are using file explorer to show files on a filesystem on a server if a user deletes the file, it remains in the file explorer also and on file system also. but when we close file explorer, it releases that file; so file deleted from a file system and file explorer also.1. UI is not refreshing automatically.2. The file is not deleted from a file system; actually, it is corrupted and remain visible.

AB Ashokkumar Balasubramanian Syncfusion Team May 12, 2017 12:30 PM UTC

Hi Samar, 
Below we have specified the possible causes to reproduce the reported issue at our end. Could you please provide the below details that will help us to provide the solution at earliest? 
1.       Did you customize the server side file handling operation for Delete and Read process? 
2.       Are you using our FileExplroer for accessing Shared File System? 
3.       Ensure once whether the file/ parent folder in the server has edit and delete permission. 
4.       If it is possible, could you please share the FileExplroer control rendering code block or its screenshot. 
5.       If it is throws any kind of error/Exception, could you please provide the error details. 
Ashokkumar B. 

SA Samar May 12, 2017 01:02 PM UTC

We have Full permission (Read and Write) on file and Parent folder on the server machine.
and below is the code where we declare file explorer:

                                  .ClientSideEvents(evt => evt.LayoutChange("onLayoutChange").Select("onSelect").Unselect("onUnselect").BeforeOpen("onBeforeOpen").Remove("onRemove"))
                                  //.ContextMenuSettings(settings => settings.Items(item => item.Files(fileOptions)))
                                  .ContextMenuSettings(settings => settings.Items(item => item.Navbar(navbar).Cwd(cwd).Files(files)))
                                  // under gridSettings you can customize the grid view functionalities
                                  .GridSettings(settings =>
                                      // disables the sorting functionality in grid view
                                      // it displays 3 columns only, like this you can display your desired columns at here
                                      .Column(column =>
                                              .HeaderText("Date Modified")

AB Ashokkumar Balasubramanian Syncfusion Team May 15, 2017 07:25 AM UTC

Hi Samar, 
We have created an incident under your account for this problem please follow up the incident. 
Ashokkumar B. 

Live Chat Icon For mobile
Up arrow icon