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

EntityDataSource

EntityDataSource

empty
QuantityShipCountryYear
CategoryNameProductName
empty
GermanyGermany Total USAUSA TotalGrand Total
199619971998199619971998
empty
BeveragesChartreuse verte
Côte de Blaye
Guaraná Fantástica
Ipoh Coffee
Lakkalikööri
Laughing Lumberjack Lager
Outback Lager
Rhönbräu Klosterbier
Sasquatch Ale
Steeleye Stout
Grand Total
empty
582680164 20 20184
  180180 256590270
 6350113 185977190
 55 55 48 48103
12103134249 11050160409
 25 25 10 1035
 9420114  66120
1210549166 147120267433
 20 20 6270132152
 6043103703935144247
73239372259692861241062130684813776
Page size:

RadPivotGrid can be bound to all ASP 3.5 DataSource control types like:

  • EntityDataSource

All you need to do is set the DataSourceID property of the pivot grid to the ID of the datasource control and you are ready to use the provided data.

  • DefaultVB.aspx
<%@ Page Language="VB"  %>

<%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>
<%@ 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" />
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadPivotGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadPivotGrid1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
        </telerik:RadAjaxLoadingPanel>
        <div class="demo-container no-bg">
            <h2 class="qsfSubtitle">EntityDataSource
            </h2>
            <telerik:RadPivotGrid RenderMode="Lightweight" ID="RadPivotGrid1" runat="server" DataSourceID="EntityDataSource1" Height="370px"
                AllowPaging="true" AllowFiltering="false" ShowFilterHeaderZone="false">
                <ClientSettings Scrolling-AllowVerticalScroll="true">
                </ClientSettings>
                <DataCellStyle Width="100px" />
                <Fields>
                    <telerik:PivotGridColumnField DataField="ShipCountry">
                    </telerik:PivotGridColumnField>
                    <telerik:PivotGridColumnField DataField="Year">
                    </telerik:PivotGridColumnField>
                    <telerik:PivotGridRowField DataField="CategoryName">
                    </telerik:PivotGridRowField>
                    <telerik:PivotGridRowField DataField="ProductName">
                    </telerik:PivotGridRowField>
                    <telerik:PivotGridAggregateField DataField="Quantity" Aggregate="Sum">
                    </telerik:PivotGridAggregateField>
                </Fields>
            </telerik:RadPivotGrid>
            <br />
            <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=NorthwindReadOnlyEntities"
                DefaultContainerName="NorthwindReadOnlyEntities" EntitySetName="Product_Reports_Comparisons">
            </asp:EntityDataSource>
        </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance