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

Range Grouping

empty
Drop Filter Fields Here
CostQuantitySellStartDate - YearSellStartDate
SafetyLevelLineShelf
H1H1 Sum of CostH1 Sum of Quantity H2H2 Sum of CostH2 Sum of QuantityTotal Sum of CostTotal Sum of Quantity
JanuaryMayJuneJuly
Sum of CostSum of QuantitySum of CostSum of QuantitySum of CostSum of QuantitySum of CostSum of Quantity
739.04121  739.04121739.04161753.995011493.036622232.07783
  1082.511041082.511041082.511041082.511042165.022083247.53312
739.041211082.511041821.552251821.552651836.506053658.058705479.601095
739.041211082.511041821.552251821.552651836.506053658.058705479.601095
        6513.882076513.882076513.88207
        3247.532443247.532443247.53244
        9761.414519761.414519761.41451
        9761.414519761.414519761.41451
500.00308  500.003080.00307  0.00307500.00615
500.00308  500.003080.00307  0.00307500.00615
1470.7224581698.0517243168.7741821821.55669017427.821212119249.371881122418.1422993
0 - 100 M-LineC
T
M-Line Total
0 - 100 Total
100 - 200 R-LineC
T
R-Line Total
100 - 200 Total
200 - 300 A-LineA
A-Line Total
Grand Total
Page size:

RadPivotGrid supports three types of grouping by ranges for its row and column fields: date time, numeric and custom.

DateTime range grouping. RadPivotGrid can combine ranges of date time row/column groups into the following time spans: Year, Quarter, Moth, Day. In order to switch on this feature, just set the GroupInterval property of the row/column field to the corresponding value.

Numeric grouping: RadPivotGrid has the capability to aggregate numeric row/column groups into custom numeric ranges. For any field that needs to combine its groups into numeric ranges, the GroupInterval property should be set to Numeric whereas the GroupIntervalNumericRange should be give the numeric span of the interval. The latter accepts double values.

Custom grouping: RadPivotGrid also provides the flexibility to implement a custom way of grouping any row/column field group values. The approach to custom grouping is programmatic and includes the creation of a new pivot grid field class that should inherit the PivotGridColumnField (for column fields) or the PivotGridRowField (for row fields) class. In the child class the GroupDescription property should be overridden to return an instance of a custom GroupDescription class. The latter must inherit the PropertyGroupDescription class and override the GroupNameFromItem method where the custom grouping logic is to be implemented.

  • DefaultVB.aspx
  • CustomDateTimeField.vb
    • CustomDateTimeField.vb
    • DefaultVB.aspx.vb
    • PivotGridDataSourceHelper.vb
<%@ Page Language="vb" AutoEventWireup="false" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.GridExamplesCSharp.RangeGrouping.DefaultVB" %>

<%@ 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:RadAjaxPanel ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1" runat="server">
        <asp:PlaceHolder ID="gridHolder1" runat="server"></asp:PlaceHolder>
    </telerik:RadAjaxPanel>
       </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance