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 2
26.7534.5021.0036.0029.2814.2244.5019.7325.66
35.0037.0013.0020.0027.1439.5014.5027.0027.09
19.0019.8833.671.0023.8435.4318.3330.3025.69
40.0036.2526.6715.0031.6736.6019.5628.5330.18
30.0027.6719.8630.0023.5014.0017.6715.1019.68
26.1523.5323.3723.5324.0723.5523.4423.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.
  • DefaultCS.aspx
  • DefaultCS.aspx.cs
<%@ Page Language="c#" AutoEventWireup="false" CodeFile="DefaultCS.aspx.cs" Inherits="Telerik.PivotGrid.Examples.Paging.DefaultCS" %>

<%@ 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"
        OnNeedDataSource="RadPivotGrid1_NeedDataSource" Width="100%" 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" Caption="Quarter" DataFormatString="Quarter {0}" 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"
                        Enabled="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