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 file explorer after deleting file.

Thread ID:

Created:

Updated:

Platform:

Replies:

130382 May 10,2017 06:44 AM May 15,2017 03:25 AM ASP.NET MVC 5
loading
Tags: FileExplorer
Samar
Asked On May 10, 2017 06:44 AM

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.





Ashokkumar Balasubramanian [Syncfusion]
Replied On May 11, 2017 09:09 AM

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? 
 
 
Regards, 
Ashokkumar B.  

Samar
Replied On May 11, 2017 09:57 AM

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.

Ashokkumar Balasubramanian [Syncfusion]
Replied On May 12, 2017 08:30 AM

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. 
 
Regards, 
Ashokkumar B. 


Samar
Replied On May 12, 2017 09:02 AM

Hi,
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:

@(Html.EJ().FileExplorer("fileExplorer1")
                                  .Path(IndexingLocation)
                                  .AjaxAction(@Url.Content("FileActionDefault"))
                                  .ShowToolbar(true)
                                  .FileTypes("*.pdf")
                                  .ClientSideEvents(evt => evt.LayoutChange("onLayoutChange").Select("onSelect").Unselect("onUnselect").BeforeOpen("onBeforeOpen").Remove("onRemove"))
                                  .Width("100%")
                                  .Height("551px")
                                  .AllowMultiSelection(true)
                                  .IsResponsive(true)
                                  .SelectedFolder(CurrentFolder)
                                  .ShowCheckbox(false)
                                  //.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
                                      settings.AllowSorting(true)
                                      // it displays 3 columns only, like this you can display your desired columns at here
                                      .Column(column =>
                                      {
                                          column.Add()
                                              .Field("name")
                                              .HeaderText("Name")
                                              .Width("400");
                                          column.Add()
                                              .Field("dateModified")
                                              .HeaderText("Date Modified")
                                              .Width("120");
                                          column.Add()
                                              .Field("size")
                                              .HeaderText("Size")
                                              .Width("90")
                                              .TextAlign(TextAlign.Right)
                                              .HeaderTextAlign(TextAlign.Left);
                                      }
                                      )
                                  )
                              )

Ashokkumar Balasubramanian [Syncfusion]
Replied On May 15, 2017 03:25 AM

Hi Samar, 
 
We have created an incident under your account for this problem please follow up the incident. 
 
 
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.

;