Available in the Full Version

Pivot Grid - ADOMD.NET

This sample demonstrates using the ADOMD.NET remote provider with the igPivotGrid.

This sample is designed for a larger screen size.

On mobile, try rotating your screen, view full size, or email to another device.

All requests are proxied through the server application to avoid cross-domain problems. In addition, the data is translated to JSON, reducing the size of the response. NOTE: This sample requires an internet connection to access the OLAP data.

Code View

Copy to Clipboard
@using Infragistics.Web.Mvc
@using IgniteUI.SamplesBrowser.Models

<!DOCTYPE html>

<html>
<head>
    <title></title>

    <!-- Ignite UI for jQuery Required Combined CSS Files -->
    <link href="http://cdn-na.infragistics.com/igniteui/2024.2/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" />
    <link href="http://cdn-na.infragistics.com/igniteui/2024.2/latest/css/structure/infragistics.css" rel="stylesheet" />

    <script src="http://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.8.3.js"></script>
    <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
    <script src="http://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script>

    <!-- Ignite UI for jQuery Required Combined JavaScript Files -->
    <script src="http://cdn-na.infragistics.com/igniteui/2024.2/latest/js/infragistics.core.js"></script>
    <script src="http://cdn-na.infragistics.com/igniteui/2024.2/latest/js/infragistics.lob.js"></script>
    <style>
        #dataSelector, #pivotGrid {
            float: left;
        }
    </style>
</head>
<body>
	<div class="sampleContent">
		<div id="dataSelector"></div>
		<div id="pivotGrid"></div>
	</div>
	<script type="text/javascript">
		$.support.cors = true;
		$(function () {
			var adomdDataSource = new $.ig.OlapXmlaDataSource({
				isRemote: true,
				serverUrl: '@Url.Action("adomd-provider-endpoint")',
				catalog: 'Adventure Works DW Standard Edition',
				cube: 'Adventure Works',
				rows: '[Date].[Calendar]',
				columns: '[Product].[Product Categories]',
				measures: '[Measures].[Internet Order Count]'
			});

			adomdDataSource.initialize()
				.done(function(rootMetadataItem) {
					$('#dataSelector').igPivotDataSelector({
						dataSource: adomdDataSource,
						height: "600px",
						width: "240px"
					});

					$("#pivotGrid").igPivotGrid({
						dataSource: adomdDataSource,
						height: "600px",
						width: "570px"
					});
				})
				.fail(function (error) {
					$("#pivotGrid").html("<h4>An error has occured on the server. <br>         One of the possible reasons is that you do not have the Microsoft.AnalysisServices.AdomdClient assembly installed. <br>         You can download Microsoft® SQL Server® 2008 R2 ADOMD.NET from         <a target='_blank' href='http://www.microsoft.com/en-us/download/confirmation.aspx?id=16978'>here</a>.         <br>Alternatively if you already have another version of this assembly installed, you can configure a binding redirect in the web.config file.         For more information see this          <a target='_blank'  href='http://help.infragistics.com/doc/jquery/?page=igOlapXmlaDataSource_Configuring_Through_a_Remote_Provider.html'>help topic</a>.</h4>");
				});
		});
	</script>
</body>
</html>