Custom paging in FileManager control

1 Answer 195 Views
Forum suggestions
Dishant
Top achievements
Rank 1
Dishant asked on 24 Jan 2022, 07:54 AM

Hello to all,

I am stuck in a problem where files are loading at a time and the FileManager control is taking some time to load so is there any other way like "Lazy Loading" or "Custom Pagination" that I can do to improve loading speed?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 27 Jan 2022, 07:41 AM

Hello Dishant,

Could you please let me know if you are loading multiple items in the FileManager? If this is the case, you could use the default load-on-demand behavior of the FileManager. You could move the hierarchy logic entirely to the server. To do that you should implement a Read endpoint for the FileManager DataSource that would return the appropriate items for a given level and folder. For example, when initially loading the FileManager and its root directory, the service would return only top-level items. When a user opens a folder, the FileManager will automatically send a request to the remote containing information (the path) about the folder that is being opened. Then the service should return all items that are directly placed within that folder.

Here is an example of such a read endpoint implemented in our Demos service:

https://github.com/telerik/kendo-ui-demos-service/blob/d2b799b15a52d56d7fe622dba21018c667686725/demos-and-odata-v3/KendoCRUDService/Controllers/FileManagerController.cs#L71

The above is used in our Demos examples:

https://demos.telerik.com/kendo-ui/filemanager/index

If it is suitable for your scenario, you could configure serverPaging for the FileManager DataSource. You could take a look at this article, where information on how this paging should be implemented is provided:

https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/configuration/serverpaging 

I hope this helps. 

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Forum suggestions
Asked by
Dishant
Top achievements
Rank 1
Answers by
Neli
Telerik team
Share this question
or