<%@ Page AutoEventWireup="false" CodeFile="DefaultVB.aspx.vb" Inherits="ClientExportManager.ApplicationScenarios.PivotGrid.DefaultVB"Language="vb" %>
<%@ Register TagPrefix="qsf" 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>
<!-- Load Pako ZLIB library to enable PDF compression -->
<script src="../../../Common/Scripts/pako.min.js"></script>
<style type="text/css">
.kendo-pdf-hide-pseudo-elements:after,
.kendo-pdf-hide-pseudo-elements:before {
display: none !important;
}
</style>
</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">
<telerik:RadButton RenderMode="Lightweight" runat="server" OnClientClicked="exportRadPivotGrid" Text="Export RadPivotGrid to PDF" AutoPostBack="false" UseSubmitBehavior="false"></telerik:RadButton>
<br />
<br />
<telerik:RadClientExportManager runat="server" ID="RadClientExportManager1">
</telerik:RadClientExportManager>
<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>
<script>
var $ = $telerik.$;
function exportRadPivotGrid() {
$find('<%=RadClientExportManager1.ClientID%>').exportPDF($(".RadPivotGrid"));
}
</script>
</form>
</body>
</html>