Virtual scrolling can be used to speed up the rendering of a grid when a massive amount of data is displayed. It allows the grid to retrieve data through callbacks to the server, making the data load faster while keeping the scrolling smooth.
The following example shows how to implement virtual scrolling for rows and columns by setting the ScrollingSettings, VirtualizationSettings and CallbackSettings properties. This markup can be added to the *.aspx page's body content.
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <%--Bind the grid to a datasource--%> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\C1NWind.mdb;Persist Security Info=True" ProviderName="System.Data.OleDb" SelectCommand="SELECT * FROM ORDERS"> </asp:SqlDataSource>
<%--Set C1GridView's ScrollingSettings.VirtualizationSettings.Mode and CallbackSettings.Action--%>
<cc1:C1GridView ID="C1GridView1" runat="server" DataSourceID="SqlDataSource1" Height="400px"> <CallbackSettings Action="Scrolling" /> <ScrollingSettings Mode="Both"> <VirtualizationSettings Mode="Both" /> </ScrollingSettings> </cc1:C1GridView>