How to Update files icons / add custom class / change file template

Hello ,

Control: FileExplorer, Version: 16.1.26

Id would like to change the aspect of the files thumbs dynamically according with the file created date:

If created date is TODAY, add a css class to print a label over the Icon like "NEW!"
If created date less than 7 days ago, add a css class to print a label over the Icon like "RECENT!"

So the first question is: 
- Has the control any way to change how file thumbs are shown? any easy template system? So I can get all files and their properties in current view and change the view or wahtever.

If not, I can process the HMTL with jquery and use the 'title' property to get the created date and change DOM accordingly but:
- Is there is any "changeEvent()" / "viewChanged" or "afterRead()" where I can put the code and process current <li>s after any READ action?

Approach to capturing html <li> elements


Thank you very much!




3 Replies

PR Piramanayagam Ramakrishnan Syncfusion Team May 29, 2018 01:00 PM UTC

Hi Ivan, 
 
Thanks for contacting Syncfusion support. 
 
You can achieve your requirement (“How to Update files icons”) in application level. For your reference, we have prepared a sample based on this and it can be downloaded from the link: Sample 
 
Please let us know further assistance on this. 
 
Regards, 
Piramanayagam R 



IM iMarrero May 29, 2018 02:14 PM UTC

Piramanayagam Ramakrishnan, 

Thank you very much.
Your example fulfills 100% my needs and its very clear. I will use it this evening and let you know.
This sample should be even in the "HOW TO" workarounds in the documentation for any other developer.

Thank you again
Ivan


PR Piramanayagam Ramakrishnan Syncfusion Team May 30, 2018 11:39 AM UTC

Hi Ivan, 
  
Most welcome, as per the suggestion we will document this sample in our help document. 
 
Regards, 
Piramanayagam R

Loader.
Up arrow icon