Home / Community & Support / Knowledge Base / RadControls for ASP.NET AJAX / FileExplorer / Setup virtual scrolling in the RadGrid embedded in RadFileExplorer

Setup virtual scrolling in the RadGrid embedded in RadFileExplorer

Article Info

Rating: Not rated

Article information

Article relates to

 RadFileExplorer for ASP.NET AJAX

Created by

 Fiko

Last modified

 September 15, 2010

Last modified by

 Fiko


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).

      NOTE:
      Please note that the count of the items should be set in order to fill the grid's height - please check the screenshot bellow.
  • 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
    • Please note that the Grid's ClientSettings.Scrolling.AllowScroll  and ClientSettings.Scrolling.UseStaticHeaders properties are set to true internaly in the code of the RadFileExplorer control and they are not required to be set. Also, the value of the VirtualItemCount property is set internally in the code of the RadFileExplorer control and you do not need to set it explicitly.
The final setup looks like this:
ASPX
<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>

Codebehind:

C#
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;
}

VB.NET
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






Comments

There are no comments yet.
If you'd like to comment on this KB article, please, send us a Support Ticket.
Thank you!

Please Sign In to rate this article.