This sample demonstrates how to perform custom sorting in the File Manager control. By defining a sortComparer function, you can override the default sort behavior to achieve natural sorting, similar to Windows Explorer. The demo shows natural sorting applied to both the LargeIconsView and the Name column in DetailsView.
The File Manager control provides built-in support for sorting files and folders. In this example, the default sort action is customized using the sortComparer property. The sortComparer function allows you to define your own sorting logic. For natural sorting behavior (e.g., treating "file2" before "file10"), you can import the built-in comparer from @syncfusion/ej2-javascript-filemanager or implement a custom function. In this demo, natural sorting is applied to the LargeIconsView and the Name column in DetailsView, ensuring that files and folders are ordered in a way that feels intuitive to users. Note: File Manager’s upload functionality is restricted in the online demos for security reasons. To test upload functionality, please install Syncfusion Essential Studio on your machine and run the demo locally.