Hello,
I have a large SQL Server table with over 600,000 records. I am testing based on your "Grid / Virtual Scrolling and Paging" example found at: http://demos.telerik.com/aspnet-ajax/grid/examples/client/virtualscrollpaging/defaultvb.aspx
I set VirtualItemCount to the total number of records in the table, i.e. VirtualItemCount="622840". See all code below.
Once I did this change, the scrolling behavior was completely messed-up. Please see attached screen shots, showing step by step what is happening.
Using Rad Controls for ASP.Net Ajax, version 2011.3.1305 for .Net framework 4.0 and Visual Studio 2010.
Regards,
M.R.
I have a large SQL Server table with over 600,000 records. I am testing based on your "Grid / Virtual Scrolling and Paging" example found at: http://demos.telerik.com/aspnet-ajax/grid/examples/client/virtualscrollpaging/defaultvb.aspx
I set VirtualItemCount to the total number of records in the table, i.e. VirtualItemCount="622840". See all code below.
Once I did this change, the scrolling behavior was completely messed-up. Please see attached screen shots, showing step by step what is happening.
Using Rad Controls for ASP.Net Ajax, version 2011.3.1305 for .Net framework 4.0 and Visual Studio 2010.
<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
CodeBehind="Default.aspx.vb" Inherits="DB2_Data._Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<
asp:Content
ID
=
"HeaderContent"
runat
=
"server"
ContentPlaceHolderID
=
"HeadContent"
>
</
asp:Content
>
<
asp:Content
ID
=
"BodyContent"
runat
=
"server"
ContentPlaceHolderID
=
"MainContent"
>
<
h2
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
Runat
=
"server"
>
</
telerik:RadScriptManager
>
</
h2
>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<
telerik:RadGrid
ID
=
"RadGrid1"
Width
=
"97%"
AllowPaging
=
"True"
PageSize
=
"14"
AllowSorting
=
"True"
runat
=
"server"
AllowCustomPaging
=
"true"
VirtualItemCount
=
"622840"
>
<
PagerStyle
Mode
=
"NumericPages"
/>
<
MasterTableView
TableLayout
=
"Fixed"
/>
<
ClientSettings
>
<
Scrolling
AllowScroll
=
"True"
EnableVirtualScrollPaging
=
"True"
UseStaticHeaders
=
"True"
SaveScrollPosition
=
"True"
></
Scrolling
>
</
ClientSettings
>
</
telerik:RadGrid
>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:ASWConnectionString %>"
SelectCommand="SELECT * FROM [DB2_Customers]" ProviderName="System.Data.SqlClient"></
asp:SqlDataSource
>
</
asp:Content
>
Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections.Generic
Imports Telerik.Web.UI
Public Class _Default
Inherits System.Web.UI.Page
Private Function GetDataTable(ByVal queryString As String) As DataTable
Dim ConnString As String = ConfigurationManager.ConnectionStrings("ASWConnectionString").ConnectionString
Dim MySqlConnection As New SqlConnection(ConnString)
Dim MySqlDataAdapter As New SqlDataAdapter
MySqlDataAdapter.SelectCommand = New SqlCommand(queryString, MySqlConnection)
Dim myDataTable As New DataTable
MySqlConnection.Open()
Try
MySqlDataAdapter.Fill(myDataTable)
Finally
MySqlConnection.Close()
End Try
Return myDataTable
End Function
Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
RadGrid1.DataSource = GetDataTable("SELECT * FROM db2_customers WHERE ID BETWEEN " & ((RadGrid1.CurrentPageIndex * RadGrid1.PageSize) + 1) & " AND " & ((RadGrid1.CurrentPageIndex + 1) * RadGrid1.PageSize))
End Sub
End Class
Regards,
M.R.