-
Data Grid
- Overview
-
Data Binding
-
Paging and Scrolling
-
Editing
-
Grouping
-
Filtering and Sorting
- Focused Row
-
Row Drag & Drop
-
Selection
-
Columns
- State Persistence
-
Appearance
-
Templates
-
Data Summaries
-
Master-Detail
-
Export to PDF
-
Export to Excel
-
Adaptability
- Keyboard Navigation
-
Pivot Grid
- Overview
-
Data Binding
-
Field Chooser
-
Features
-
Export to Excel
-
Tree List
- Overview
-
Data Binding
- Sorting
- Paging
-
Editing
- Node Drag & Drop
- Focused Row
-
Selection
-
Filtering
-
Column Customization
- State Persistence
- Adaptability
- Keyboard Navigation
-
Scheduler
- Overview
-
Data Binding
-
Views
-
Features
- Virtual Scrolling
-
Grouping
-
Customization
- Adaptability
-
Html Editor
-
Chat
-
Diagram
- Overview
-
Data Binding
-
Featured Shapes
-
Custom Shapes
-
Document Capabilities
-
User Interaction
- UI Customization
- Adaptability
-
Charts
- Overview
-
Data Binding
-
Area Charts
-
Bar Charts
- Bullet Charts
-
Doughnut Charts
-
Financial Charts
-
Line Charts
-
Pie Charts
-
Point Charts
-
Polar and Radar Charts
-
Range Charts
-
Sparkline Charts
-
Tree Map
-
Funnel and Pyramid Charts
- Sankey Chart
-
Combinations
-
More Features
-
Export
-
Selection
-
Tooltips
-
Zooming
-
-
Gantt
- Overview
-
Data
-
UI Customization
- Strip Lines
- Export to PDF
- Sorting
-
Filtering
-
Gauges
- Overview
-
Data Binding
-
Bar Gauge
-
Circular Gauge
-
Linear Gauge
-
Navigation
- Overview
- Accordion
-
Menu
- Multi View
-
Drawer
-
Tab Panel
-
Tabs
-
Toolbar
- Pagination
-
Tree View
- Right-to-Left Support
-
Layout
-
Tile View
- Splitter
-
Gallery
- Scroll View
- Resizable
-
-
Editors
- Overview
- Autocomplete
-
Calendar
- Check Box
- Color Box
- Date Box
-
Date Range Box
-
Drop Down Box
-
Number Box
-
Select Box
- Switch
-
Tag Box
- Text Area
- Text Box
- Validation
- Custom Text Editor Buttons
- Right-to-Left Support
- Editor Appearance Variants
-
Forms and Multi-Purpose
- Overview
- Button Group
- Field Set
-
Filter Builder
-
Form
- Radio Group
-
Range Selector
- Numeric Scale (Lightweight)
- Numeric Scale
- Date-Time Scale (Lightweight)
- Date-Time Scale
- Logarithmic Scale
- Discrete scale
- Custom Formatting
- Use Range Selection for Calculation
- Use Range Selection for Filtering
- Image on Background
- Chart on Background
- Customized Chart on Background
- Chart on Background with Series Template
- Range Slider
- Slider
-
Sortable
-
File Management
-
File Manager
- Overview
-
File System Types
-
Customization
-
File Uploader
-
-
Actions and Lists
-
Maps
- Overview
-
Map
-
Vector Map
-
Dialogs and Notifications
-
Localization
Pivot Grid - Standalone Field Chooser
DevExtreme includes a standalone PivotGridFieldChooser component. Unlike its integrated counterpart, the standalone field chooser can remain visible on the page at all times.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
@using DevExtreme.MVC.Demos.Models
@(Html.DevExtreme().PivotGrid<Sale>()
.ID("sales")
.AllowSortingBySummary(true)
.AllowSorting(true)
.AllowFiltering(true)
.ShowBorders(true)
.DataSource(d => d
.Store(s => s.WebApi().Controller("PivotGridData"))
.Fields(fields => {
fields.AddFor(m => m.Region)
.Width(120)
.Area(PivotGridArea.Row)
.HeaderFilter(hf => hf.Search(hfs => hfs.Enabled(true)));
fields.AddFor(m => m.City)
.Width(150)
.Area(PivotGridArea.Row)
.HeaderFilter(hf => hf.Search(hfs => hfs.Enabled(true)))
.Selector("pivotGrid_dataSource_cityField_selector");
fields.AddFor(m => m.Date)
.Area(PivotGridArea.Column);
fields.AddFor(m => m.Amount)
.Caption("Sales")
.Area(PivotGridArea.Data)
.SummaryType(SummaryType.Sum)
.Format(Format.Currency);
})
)
.FieldChooser(fc => fc.Enabled(false))
)
<div class="container">
<div id="sales-fieldchooser"></div>
<div class="bottom-bar">
@(Html.DevExtreme().Button()
.ID("applyButton")
.Text("Apply")
.Type(ButtonType.Default)
.Visible(false)
.OnClick("applyButton_onClick")
)
@(Html.DevExtreme().Button()
.ID("cancelButton")
.Text("Cancel")
.Visible(false)
.OnClick("cancelButton_onClick")
)
</div>
<div class="options">
<div class="caption">Options</div>
<div class="option">
<span>Choose layout:</span>
@(Html.DevExtreme().RadioGroup()
.ID("layouts")
.DataSource(Model)
.Layout(Orientation.Vertical)
.ValueExpr("Key")
.DisplayExpr("Name")
.Value(PivotGridFieldChooserLayout.Layout0)
.OnValueChanged("radioGroup_onValueChanged")
)
</div>
<div class="option">
<span>Apply Changes Mode:</span>
@(Html.DevExtreme().SelectBox()
.ID("applyChangesMode")
.InputAttr("aria-label", "Apply Changes Mode")
.DataSource(new JS("applyChangesModes"))
.Width(180)
.Value(new JS("applyChangesModes[0]"))
.OnValueChanged("selectBox_onValueChanged")
)
</div>
</div>
</div>
<script>
var applyChangesModes = ["instantly", "onDemand"];
function pivotGrid_dataSource_cityField_selector(data) {
return data.City + " (" + data.Country + ")";
}
function radioGroup_onValueChanged(e) {
$("#sales-fieldchooser").dxPivotGridFieldChooser("instance").option("layout", e.value);
}
function selectBox_onValueChanged(data) {
$("#sales-fieldchooser").dxPivotGridFieldChooser("instance").option("applyChangesMode", data.value);
$("#applyButton").dxButton("instance").option("visible", data.value === "onDemand");
$("#cancelButton").dxButton("instance").option("visible", data.value === "onDemand");
}
function applyButton_onClick(e) {
$("#sales-fieldchooser").dxPivotGridFieldChooser("instance").applyChanges();
}
function cancelButton_onClick(e) {
$("#sales-fieldchooser").dxPivotGridFieldChooser("instance").cancelChanges();
}
$(function() {
$("#sales-fieldchooser").dxPivotGridFieldChooser({
dataSource: $("#sales").dxPivotGrid("instance").getDataSource(),
texts: {
allFields: "All",
columnFields: "Columns",
dataFields: "Data",
rowFields: "Rows",
filterFields: "Filter"
},
width: 400,
height: 400
});
});
</script>
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
Follow the steps below to connect the PivotGridFieldChooser with the PivotGrid:
-
Bind both components to the same data source
Assign the same PivotGridDataSource instance to the dataSource property of both components. -
(Optional) Disable the integrated field chooser
Both field choosers can work simultaneously, but if you want to disable the integrated version, set the PivotGrid's fieldChooser.enabled property to false. -
(Optional) Apply field changes on demand
When users move fields within the field chooser, the changes are applied to the connected PivotGrid instantly. To change this behavior, set the applyChangesMode to "onDemand". In this mode, the changes are applied/canceled only when you call the applyChanges()/cancelChanges() method or set a new state. You can add a UI for these methods. For example, in this demo, they are bound to the Apply and Cancel buttons. Select "onDemand" from the Apply Changes Mode drop-down menu to display these buttons.
The standalone and integrated field choosers share features. For example, both field choosers include three layouts. You can use the radio buttons to switch between field choosers and review the differences. For information about other available features, refer to the Integrated Field Chooser demo.