Auto refresh the FileExplorer at specific time intervals in all clients
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
Sample
Javascript: https://jsplayground.syncfusion.com/0crt0odp
Asp.Net Web Forms: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Auto_refresh_clients-1907612127