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

Paging

empty
QuantityYearQuarter
ProductName
19971997 Total 19981998 TotalGrand Total
Quarter 1Quarter 2Quarter 3Quarter 4Quarter 1Quarter 2Quarter 3Quarter 4
36.0028.5716.5060.0029.2812.0041.6713.259.0019.7325.66
20.0055.006.0018.0027.1425.0027.67  27.0027.09
22.7525.6724.0022.4423.8418.3338.3351.5015.0030.3025.69
25.1738.3317.0035.7131.6721.7531.60100.0022.0028.5330.18
22.83 15.0028.7523.5017.6718.3325.006.0015.1019.68
23.1425.0324.7023.3724.0726.0020.7925.5322.8423.5123.85
Alice Mutton
Aniseed Syrup
Boston Crab Meat
Camembert Pierrot
Carnarvon Tigers
Grand Total
Page 1 of 16
  • Demo Configurator
The purpose of the demo for Telerik's ASP.NET Pivot Table is to show the built-in paging capabilities of RadPivotGrid control. The paging functionality of pivotgrid can be enabled by setting the AllowPaging property to true. The available settings are: PageSize, Position (Bottom, Top or TopAndBottom) and Mode (Advanced, NextPrev, NextPrevAndNumeric, NextPrevNumericAndAdvanced, NumericPages, Slider). When pager mode is set to NextPrevAndNumeric, you have the option to choose the page size control type. If sorting is enabled as well, paging operation will automatically retain the sort order and sort direction.

RadPivotGrid provides PageSizeControlType property collection which is an enum of type PagerDropDownControlType and has three values available: None, RadComboBox, RadDropDownList with RadComboBox being the default one. As it name implies, the property specifies what type of page size drop down control will be rendered. The user is given an easy way to switch off the page size combo or replace it with its light weight counterpart RadDropDownList.
  • DefaultVB.aspx
  • DefaultVB.aspx.vb
<%@ Page Language="vb" AutoEventWireup="false" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.PivotGrid.Examples.Paging.DefaultVB" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<div class="demo-container no-bg">
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
   <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadPivotGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadPivotGrid1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ConfiguratorPanel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadPivotGrid1"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="ConfiguratorPanel1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadPivotGrid RenderMode="Lightweight" runat="server" ID="RadPivotGrid1" AllowPaging="true" PageSize="5"
        AllowSorting="true" AllowFiltering="false" ShowFilterHeaderZone="false">
        <PagerStyle Mode="Slider" AlwaysVisible="true"></PagerStyle>
        <Fields>
            <telerik:PivotGridColumnField DataField="Year" Caption="Year" UniqueName="Discount">
            </telerik:PivotGridColumnField>
            <telerik:PivotGridColumnField DataField="Quarter" DataFormatString="Quarter {0}" Caption="Quarter" UniqueName="UnitPrice">
            </telerik:PivotGridColumnField>
            <telerik:PivotGridAggregateField DataField="Quantity" Caption="Quantity" UniqueName="Quantity"
                Aggregate="Average" DataFormatString="{0:F2}">
            </telerik:PivotGridAggregateField>
            <telerik:PivotGridRowField DataField="ProductName" Caption="ProductName" UniqueName="ProductName">
            </telerik:PivotGridRowField>
            <telerik:PivotGridRowField IsHidden="true" DataField="TotalPrice" Caption="OrderID"
                UniqueName="OrderID" DataFormatString="{0:F2}">
            </telerik:PivotGridRowField>
        </Fields>
    </telerik:RadPivotGrid>
    </div>
    <telerik:ConfiguratorPanel runat="server" ID="ConfiguratorPanel1">
        <Views>
            <qsf:View>
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn1" runat="server" Size="Medium">
                    <qsf:ComboBox ID="RadComboBox1" runat="server" Label="Pager mode:" AutoPostBack="true"
                        OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged">
                                <Items>
                                    <telerik:RadComboBoxItem Text="NextPrev" Value="0"></telerik:RadComboBoxItem>
                                    <telerik:RadComboBoxItem Text="NumericPages" Value="1"></telerik:RadComboBoxItem>
                                    <telerik:RadComboBoxItem Text="NextPrevAndNumeric" Value="2"></telerik:RadComboBoxItem>
                                    <telerik:RadComboBoxItem Text="NextPrevNumericAndAdvanced" Value="3"></telerik:RadComboBoxItem>
                                    <telerik:RadComboBoxItem Text="Advanced" Value="4"></telerik:RadComboBoxItem>
                                    <telerik:RadComboBoxItem Text="Slider" Value="5" Selected="true"></telerik:RadComboBoxItem>
                                </Items>
                    </qsf:ComboBox>
                </qsf:ConfiguratorColumn>
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn2" runat="server" Size="Medium">
                    <qsf:ComboBox ID="ddlPageSizeControlType" runat="server" Label="Page size control type:" AutoPostBack="true"
                        WEnabled="false" OnSelectedIndexChanged="ddlPageSizeControlType_SelectedIndexChanged">
                                <Items>
                                    <telerik:RadComboBoxItem Text="RadComboBox" Value="RadComboBox" Selected="True" />
                                    <telerik:RadComboBoxItem Text="RadDropDownList" Value="RadDropDownList" />
                                    <telerik:RadComboBoxItem Text="None" Value="None" />
                                </Items>
                    </qsf:ComboBox>
                </qsf:ConfiguratorColumn>
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn3" runat="server" Size="Medium">
                    <qsf:ComboBox ID="RadComboBox2" runat="server" Label="Pager position:" AutoPostBack="true"
                        OnSelectedIndexChanged="RadComboBox2_SelectedIndexChanged">
                                <Items>
                                    <telerik:RadComboBoxItem Text="Bottom" Value="0" Selected="true"></telerik:RadComboBoxItem>
                                    <telerik:RadComboBoxItem Text="Top" Value="1"></telerik:RadComboBoxItem>
                                    <telerik:RadComboBoxItem Text="Top and Bottom" Value="2"></telerik:RadComboBoxItem>
                                </Items>
                    </qsf:ComboBox>
                </qsf:ConfiguratorColumn>
            </qsf:View>
        </Views>
    </telerik:ConfiguratorPanel>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance