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

Setup virtual scrolling in the RadGrid embedded in RadFileExplorer

## HOW TO

Setup virtual scrolling in the RadGrid embedded in RadFileExplorer control (used in the RadEditor's dialogs as well)

DESCRIPTION

This article shows how to enable the VirtualScrolling feature of the grid embedded in the RadFileExplorer control. After applying the steps in this article you will no longer see the Pager (a RadSlider) in the bottom of the grid when the RadFileExplorer's AllowPaging="true" is set.

SOLUTION

There are several properties (for more details please refer to this help page) that need to be set in order to enable virtual scrolling feature:

RadFileExplorer's properties:

- `AllowPaging="true"` - enables the paging (this property can be set directly to the embedded grid as well)
- `PageSize="15"` - sets the count of the rows (this property can be set directly to the embedded grid as well).   


<blockquote class='note'><p>Please note that the count of the items should be set in order to fill the grid's height - please check the screenshot bellow.</p></blockquote>
>

Properties of the embedded RadGrid (should be set in codebehind):

- `RadFileExplorer1.Grid.ClientSettings.Scrolling.EnableVirtualScrollPaging = true`
- `RadFileExplorer1.Grid.AllowCustomPaging = true`
- `RadFileExplorer1.Grid.PagerStyle.Visible = false` - hides the pager

<blockquote class='note'><p>Please note that the Grid's <code>ClientSettings.Scrolling.AllowScroll</code>  and <code>ClientSettings.Scrolling.UseStaticHeaders</code> properties are set to <code>true</code> internaly in the code of the RadFileExplorer control. The value of the <code>VirtualItemCount</code> property is also set internally.</p></blockquote>
>

The final setup looks like this:

<telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" Width="500px" Height="400"
    EnableCopy="true" AllowPaging="true" PageSize="15">
    <Configuration ViewPaths="~/ROOT/" DeletePaths="~/ROOT/" UploadPaths="~/ROOT/" />
</telerik:RadFileExplorer>
protected void Page_Load(object sender, EventArgs args)
{
    RadFileExplorer1.Grid.ClientSettings.Scrolling.AllowScroll = true;
    RadFileExplorer1.Grid.ClientSettings.Scrolling.EnableVirtualScrollPaging = true;
    RadFileExplorer1.Grid.AllowCustomPaging = true;
    RadFileExplorer1.Grid.PagerStyle.Visible = false;
}
Protected Sub Page_Load(ByVal sender As Object, ByVal args As EventArgs) Handles Me.Load
    RadFileExplorer1.Grid.ClientSettings.Scrolling.AllowScroll = True
    RadFileExplorer1.Grid.ClientSettings.Scrolling.EnableVirtualScrollPaging = True
    RadFileExplorer1.Grid.AllowCustomPaging = True
    RadFileExplorer1.Grid.PagerStyle.Visible = False
End Sub

You can find atached the projects demonstrating the described approached here:

In this article
Not finding the help you need? Improve this article