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

Binding to 300 000 Rows

Drag a column header and drop it here to group by that column
ProductIDProduct nameUnit priceQuantity per unitUnits in stockDiscontinued
Page size:
 335104 items in 33511 pages
23Tunnbröd$9.0012 - 250 g pkgs.61
24Guaraná Fantástica$4.5012 - 355 ml cans20
25NuNuCa Nuß-Nougat-Creme$14.0020 - 450 g glasses76
26Gumbär Gummibärchen$31.23100 - 250 g bags15
27Schoggi Schokolade$43.90100 - 100 g pieces49
28Rössle Sauerkraut$45.6025 - 825 g cans26
29Thüringer Rostbratwurst$123.7950 bags x 30 sausgs.0
30Nord-Ost Matjeshering$25.8910 - 200 g glasses10
31Gorgonzola Telino$12.5012 - 100 g pkgs0
32Mascarpone Fabioli$32.0024 - 200 g pkgs.9
  • NoFilter
  • Contains
  • DoesNotContain
  • StartsWith
  • EndsWith
  • EqualTo
  • NotEqualTo
  • GreaterThan
  • LessThan
  • GreaterThanOrEqualTo
  • LessThanOrEqualTo
  • Between
  • NotBetween
  • IsEmpty
  • NotIsEmpty
  • IsNull
  • NotIsNull
  • Custom
  • Demo Configurator
Settings

This example demonstrates binding over 300.000 records to RadGrid.

Currently, the data is bound programmatically using the NeedDataSource event. however, the Grid will behave similarly well when binding data using Declarative DataSource controls such as:

  • SqlDataSource
  • EntityDataSouce
  • ObjectDataSource

If you're experiencing issues with the performance, the following articles offer a few tips and suggestions:

  • defaultvb.aspx
  • defaultvb.aspx.vb
  • styles.css
<%@ Page Language="VB" CodeFile="defaultvb.aspx.vb" AutoEventWireup="false" Inherits="Telerik.GridExamplesVBNET.DataEditing.ProgramaticLinqUpdates.DefaultVB" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" RequestQueueSize="5">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="CheckBox1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" />
    <div class="demo-container no-bg">
        <telerik:RadGrid RenderMode="Lightweight" AutoGenerateColumns="False" ID="RadGrid1" OnNeedDataSource="RadGrid1_NeedDataSource"
            AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" runat="server"
            ShowGroupPanel="true">
            <PagerStyle Mode="NextPrevAndNumeric" />
            <GroupingSettings CaseSensitive="false" />
            <MasterTableView TableLayout="Fixed">
                <Columns>
                    <telerik:GridNumericColumn Aggregate="Count" HeaderText="ProductID" DataField="ProductID"
                        UniqueName="ProductID" SortExpression="ProductID" HeaderStyle-Width="60px" FilterControlWidth="40px"
                        AutoPostBackOnFilter="true" CurrentFilterFunction="equalto" ShowFilterIcon="false" />
                    <telerik:GridBoundColumn HeaderText="Product name" DataField="ProductName" UniqueName="ProductName"
                        SortExpression="ProductName" HeaderStyle-Width="180px" FilterControlWidth="140px"
                        AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" />
                    <telerik:GridNumericColumn Aggregate="Sum" DataFormatString="{0:C}" FooterAggregateFormatString="<b>Total Price:</b> {0:C}"
                        HeaderText="Unit price" DataField="UnitPrice" UniqueName="UnitPrice" SortExpression="UnitPrice"
                        FilterControlWidth="80px" HeaderStyle-Width="115px" />
                    <telerik:GridBoundColumn HeaderText="Quantity per unit" DataField="QuantityPerUnit"
                        UniqueName="QuantityPerUnit" SortExpression="QuantityPerUnit" HeaderStyle-Width="110px"
                        FilterControlWidth="90px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                        ShowFilterIcon="false" />
                    <telerik:GridNumericColumn Aggregate="Sum" FooterAggregateFormatString="<b>Total Units: </b>{0}"
                        HeaderText="Units in stock" DataField="UnitsInStock" UniqueName="UnitsInStock"
                        SortExpression="UnitsInStock" FilterControlWidth="80px" HeaderStyle-Width="120px" />
                    <telerik:GridCheckBoxColumn DataField="Discontinued" UniqueName="Discontinued" HeaderText="Discontinued"
                        HeaderStyle-Width="70px" />
                </Columns>
            </MasterTableView>
            <ClientSettings AllowDragToGroup="true">
            </ClientSettings>
        </telerik:RadGrid>
    </div>
    <qsf:ConfiguratorPanel ID="ConfiguratorPanel1" runat="server">
        <Views>
            <qsf:View>
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn1" runat="server" Size="Wide" Title="Settings">
                    <ul class="fb-group">
                        <li>
                            <asp:CheckBox ID="CheckBox1" Text="Show aggregates" AutoPostBack="true" runat="server" />
                        </li>
                    </ul>
                </qsf:ConfiguratorColumn>
            </qsf:View>
        </Views>
    </qsf:ConfiguratorPanel>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance