Articles in this section
Category / Section

Auto refresh the FileExplorer at specific time intervals in all clients

1 min read

When a FileExplorer control is hosted and run in different clients, you may need to do change in one client and make it reflect in all the clients automatically. This can be done by automatically refreshing the control at specific time intervals. For achieving this, set a particular time interval to window using the setInterval method and call the FileExplorer’s refresh method inside this function. In this way, the control will be refreshed in all the clients after the time interval. The following code sample demonstrates this.

<script> 
window.setInterval(function () { 
            var fileObj = $("#fileexplorer").data("ejFileExplorer"); 
            fileObj.refresh(); 
}, 60000); 
</script> 

 

You can enable the enablePersistence property of FileExplorer to maintain the path and selected files on refresh.

Output

FileExplorer

 

Sample

Javascript: https://jsplayground.syncfusion.com/0crt0odp

Asp.Net Web Forms: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Auto_refresh_clients-1907612127

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied