Your search did not match any results.

Pivot Grid - Web API Service

The PivotGrid can communicate with a Web API service. The quantity of aggregated data is irrelevant when aggregation is performed on the server. For example, the PivotGrid works with a million aggregated records in this demo.

To configure access to a Web API service from the client, use the createStore method, which is part of the DevExtreme.AspNet.Data extension. This extension also allows you to configure server-side data processing for DevExtreme components.

You should also set the remoteOperations property to true to notify the PivotGrid that data is aggregated on the server.

Backend API
@(Html.DevExtreme().PivotGrid() .AllowSorting(true) .AllowSortingBySummary(true) .AllowFiltering(true) .Height(620) .ShowBorders(true) .RowHeaderLayout(PivotGridRowHeadersLayout.Tree) .Scrolling(e => e.Mode(PivotGridScrollingMode.Virtual)) .DataSource(d => d .RemoteOperations(true) .Store(s => s.RemoteController() .Key("OrderID") .LoadUrl("https://js.devexpress.com/Demos/WidgetsGalleryDataService/api/Sales/Orders") ) .Fields(fields => { fields.Add() .Caption("Category") .DataField("ProductCategoryName") .Width(250) .SortBySummaryField("SalesAmount") .SortBySummaryPath(new string[0]) .SortOrder(SortOrder.Desc) .Expanded(true) .Area(PivotGridArea.Row); fields.Add() .Caption("Subcategory") .DataField("ProductSubcategoryName") .Width(250) .SortBySummaryField("SalesAmount") .SortBySummaryPath(new string[0]) .SortOrder(SortOrder.Desc) .Area(PivotGridArea.Row); fields.Add() .Caption("Product") .DataField("ProductName") .Width(250) .SortBySummaryField("SalesAmount") .SortBySummaryPath(new string[0]) .SortOrder(SortOrder.Desc) .Area(PivotGridArea.Row); fields.Add() .Caption("Date") .DataField("DateKey") .DataType(PivotGridDataType.Date) .Area(PivotGridArea.Column); fields.Add() .Caption("Amount") .DataField("SalesAmount") .SummaryType(SummaryType.Sum) .Format(Format.Currency) .Area(PivotGridArea.Data); fields.Add() .Caption("Store") .DataField("StoreName"); fields.Add() .Caption("Quantity") .DataField("SalesQuantity") .SummaryType(SummaryType.Sum); fields.Add() .Caption("Store") .DataField("StoreName"); fields.Add() .Caption("Unit Price") .DataField("UnitPrice") .SummaryType(SummaryType.Sum) .Format(Format.Currency); fields.Add() .DataField("Id") .Visible(false); }) ) )
using DevExtreme.MVC.Demos.Models.SampleData; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace DevExtreme.MVC.Demos.Controllers { public class PivotGridController : Controller { public ActionResult WebAPIService() { return View(); } } }

A 1-Click Solution for CRUD Web API Services with Role-based Access Control via EF Core

If you target .NET for your backend API, be sure to check out Web API Service and register your free copy today. The Solution Wizard scaffolds an OData v4 Web API Service (.NET 6+) with integrated authorization & CRUD operations powered by EF Core ORM. You can use OAuth2, JWT or custom authentication strategies alongside tools like Postman or Swagger (OpenAPI) for API testing. The built-in Web API Service also filters out secured server data based on permissions granted to users. Advanced/enterprise functions include audit trail, endpoints to download reports, file attachments, check validation, obtain localized captions, etc.

To use the free Solution Wizard (which creates the Web API Service), run the Universal Component Installer from the DevExpress Download Manager and use our predefined template in Visual Studio 2022+.

Read Tutorial | View Examples: JavaScript (DevExtreme) & JavaScript (Svelte) | Watch Videos