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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Default sort by Modified date [asc/desc]?

Thread ID:

Created:

Updated:

Platform:

Replies:

149920 Dec 14,2019 08:18 AM UTC Jul 13,2020 06:01 AM UTC JavaScript - EJ 2 5
loading
Tags: FileManager
Bui duc Anh
Asked On December 14, 2019 08:18 AM UTC

Hi Everybody,

I'm using EJ2 FileManager for JavasScript, I have a question: Can I setting my FileManager with default sort by Modified date [asc/desc].
FileManager control's default sort by Name asc

Thanks

Keerthana Rajendran [Syncfusion]
Replied On December 16, 2019 10:05 AM UTC

Hi Bui duc Anh, 
 
Good day to you, 
 
We have checked your reported query on “sort the files based on dateModified by default”. Currently, we have not provided support for this. But we can achieve your requirement in sample level with a workaround solution. In File manager component, success () event is triggered when ajax request is complete. By using this event you can change the sort of file manager after the data is loaded in the file manager. Refer the below code snippet. 

 success: function(args) { 
          var root = this.element; 
          setTimeout(function(){ 
            // You can get the datemodified header and perform the click operation. 
            root.querySelectorAll(".e-headercell")[3].click(); 
          }, 1000); 
        } 
 
                                                                  
  
  
  
  
  
  
  
For your reference, we have prepared a sample. 

Please let us know, if you have any concerns. 
 
Regards, 
Keerthana 


Bui duc Anh
Replied On June 18, 2020 05:01 PM UTC

thank you so much Keerthana, I did it

Sowmiya Padmanaban [Syncfusion]
Replied On June 19, 2020 04:33 AM UTC

Hi Bui duc Anh,  
  
Most Welcome. We are happy to hear that your probelm has been resolved. Please contact us, if you need any help from us. 
  
Regards, 
Sowmiya.P 


Bui duc Anh
Replied On July 10, 2020 04:03 AM UTC

I read the NEW FEATURES release on version 18.2.44
#275878 - Provided an option to prevent default sorting of the files and folders in the File Manager component.

Could you please tell me is this the option to set default sort (by name, modified date..) asc/desc? and how to do that?

Thanks


Shameer Ali Baig Sulaiman Ali Baig [Syncfusion]
Replied On July 13, 2020 06:01 AM UTC

Hi Bui duc Anh, 
 
Thanks for contacting Syncfusion support. 
 
In the latest EJ2 version (v18.2.44), we have introduced option to prevent default sorting (Ascending) in File Manager. 
 
By setting the sortOrder as None (Indicates that the folders and files are not sorted), we can prevent the default sorting in FileManager. 
 
Please, check the following sample for sortOrder as none 
 
 
This feature not provides option to set sortOrder by date modified, name and such fields. We suggest you use our previously shared solution to meet your expected requirement. 
 
Please, let us know if you need any further assistance. 
 
Regards, 
Shameer Ali Baig S.  


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon