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

Persist user ui settings

Is there an option to persist settings per user? For example when a user clicks the grid view instead of the large icons that every instance of the file explorer will be showing the gridview...

7 Replies

BP Balamurugan P Syncfusion Team December 5, 2016 09:02 AM UTC

Hi Wouter, 
Thanks for using Syncfusion Products.  
We have analyzed your reported requirement “Persist user intractable UI settings in FileExplorer” and you can achieve this,  by setting the “enablePersistence” as true. Please refer following code block to persist the user interactions of FileExplorer.  
Code block [JavaScript]: 
       isResponsive: true, 
       width: "100%", 
       minWidth: "150px", 
       fileTypes: "*.png, *.gif, *.jpg, *.jpeg, *.docx", 
       layout: "grid", 
       enablePersistence: true, 
       ajaxAction: "http://js.syncfusion.com/demos/ejServices/api/FileExplorer/FileOperations"                 
We have prepared a sample based on this and you can find the sample under the following location: 
Please let us know if you require any further assistance. 

WO Wouter December 5, 2016 11:24 AM UTC

Thanks, seems missing in the documentation...

PR Piramanayagam Ramakrishnan Syncfusion Team December 6, 2016 09:20 AM UTC

Hi Wouter, 
Sorry for the inconvenience.  
Unfortunately, we didn’t provide this in help document. We will update the document in online on or before end of this month (December 2016).  We appreciate your patience until then. 
Piramanayagam R  

WO Wouter January 24, 2017 09:41 AM UTC

I think its in the documentation now: https://help.syncfusion.com/api/js/ejfileexplorer#members:enablepersistence

Is it possible to customize the addToPersist array?

BP Balamurugan P Syncfusion Team January 25, 2017 12:36 PM UTC

Hi Wouter, 
Yes, you can customize the “_addToPersist array as shown in below code block. Here you have to add this customization code after refereeing the “ej.web.all.min.js” file. 

<script type="text/javascript" src="//cdn.syncfusion.com/ "></script> 
 //you can customize it as per your requirement 
 ej.FileExplorer.prototype._addToPersist= ["layout", "selectedFolder", "height", "width"]; 

We have prepared a sample based on that and you can get it from following location. 

Please let us know if you require any further assistance. 

Balamurugan P 

WO Wouter January 25, 2017 12:42 PM UTC

Yep, that works, but it seems to me that this variable is meant to be private. Since this is outside the public api I guess this can be changed without notice in the changelogs?

BP Balamurugan P Syncfusion Team January 26, 2017 07:27 AM UTC

Hi Wouter, 
For this customization, usually we suggest “_addToPersist” variable to all. Also we will add this API in our online documentation within five business days 2nd Feb, 2017. That help you to track the changelogs regarding the “_addToPersist” private API. 


Live Chat Icon For mobile
Up arrow icon