New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Virtualization and Custom Paging

DESCRIPTION

OutOfMemory Exception when providing data to a RadGrid with Virtualization.

Virtualization is, first and foremost, a feature that improves the user experience. It can, however, tax the server in its default implementation where all the data is provided to the grid in the NeedDataSource event and the grid determines which items to return to the client when scrolling reaches the point when new data is needed.

SOLUTION

You can employ custom paging and provide only the relevant data to the grid in the NeedDataSource event. This will depend on the page size and the items configured for loading at any given time. You can find a sample attached below. Note that this applies only to paging, sorting and grouping

Alternatively, just use custom paging without virtualization.

In this article