Your search did not match any results.

Integrated Field Chooser


The field chooser is a pivot grid element that allows you to manage the displayed fields. You can invoke it by clicking the Field Chooser icon at the top-left corner or by selecting the "Show Field Chooser" command on the PivotGrid's context menu. Changes made in the field chooser can be applied to the PivotGrid in instant or on-demand mode. In the latter case, the field chooser is supplied with the OK and Cancel buttons.

@(Html.DevExtreme().PivotGrid() .ID("sales") .AllowSortingBySummary(true) .AllowSorting(true) .AllowFiltering(true) .AllowExpandAll(true) .Height(470) .ShowBorders(true) .FieldChooser(fc => fc .AllowSearch(true) .ApplyChangesMode(ApplyChangesMode.Instantly)) .DataSource(d => d .Fields(fields => { fields.Add() .DataField("[Product].[Category]") .Area(PivotGridArea.Row); fields.Add() .DataField("[Product].[Subcategory]") .Area(PivotGridArea.Row) .HeaderFilter(hf => hf.AllowSearch(true)); fields.Add() .DataField("[Ship Date].[Calendar Year]") .Area(PivotGridArea.Column); fields.Add() .DataField("[Ship Date].[Month of Year]") .Area(PivotGridArea.Column); fields.Add() .DataField("[Measures].[Customer Count]") .Area(PivotGridArea.Data); }) .Store(s => s.Xmla() .Url("") .Catalog("Adventure Works DW Standard Edition") .Cube("Adventure Works") ) ) ) <div class="options"> <div class="caption">Options</div> <div class="option"> <span>Apply Changes Mode:</span> @(Html.DevExtreme().SelectBox() .ID("applyChangesMode") .DataSource(new JS("applyChangesModes")) .Width(180) .Value(new JS("applyChangesModes[0]")) .OnValueChanged("selectBox_onValueChanged") ) </div> </div> <script> var applyChangesModes = ["instantly", "onDemand"]; function selectBox_onValueChanged(data) { $("#sales").dxPivotGrid("instance").option("fieldChooser.applyChangesMode", data.value); } </script>
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 IntegratedFieldChooser() { return View(); } } }
.options { padding: 20px; background-color: rgba(191, 191, 191, 0.15); margin-top: 20px; } .caption { font-size: 18px; font-weight: 500; } .option { margin-top: 10px; } #applyChangesMode { margin-top: 5px; }