PivotGridFieldChooser

A complementary widget for the PivotGrid that allows you to manage data displayed in the PivotGrid. The field chooser is already integrated in the PivotGrid and can be invoked using the context menu. If you need to continuously display the field chooser near the PivotGrid widget, use the PivotGridFieldChooser widget.

Included in: dx.web.js, dx.viz-web.js, dx.all.js
Export: default

DevExtreme widgets are integrated with many popular libraries and frameworks. See the Installation section (for JavaScript libraries) or the Prerequisites and Installation section (for ASP.NET MVC framework) to find details on setting up DevExtreme with a particular library or framework.

The following code shows how to create the PivotGridFieldChooser widget using every supported library and framework. For more details on working with widgets in these libraries and frameworks, see the Widget Basics topic for jQuery, Angular, AngularJS, Knockout or ASP.NET MVC.

jQuery
JavaScript
HTML
var pivotGridDataSource = new DevExpress.data.PivotGridDataSource({
    // ...
});
$(function () {
    $("#fieldChooser").dxPivotGridFieldChooser({
        dataSource: pivotGridDataSource
    });
    $("#pivotGrid").dxPivotGrid({
        dataSource: pivotGridDataSource
    });
});
<div id="fieldChooser"></div>
<div id="pivotGrid"></div>
Angular
HTML
TypeScript
<dx-pivot-grid-field-chooser [dataSource]="pivotGridDataSource"></dx-pivot-grid-field-chooser>
<dx-pivot-grid [dataSource]="pivotGridDataSource"></dx-pivot-grid>
import { DxPivotGridFieldChooserModule } from 'devextreme-angular';
import PivotGridDataSource from 'devextreme/ui/pivot_grid/data_source';
// ...
export class AppComponent {
    pivotGridDataSource = new PivotGridDataSource({
        // ...   
    });
}
@NgModule({
    imports: [
        // ...
        DxPivotGridFieldChooserModule
    ],
    // ...
})
AngularJS
HTML
JavaScript
<div ng-controller="DemoController">
    <div dx-pivot-grid-field-chooser="{
        dataSource: pivotGridDataSource
    }"></div>
    <div dx-pivot-grid="{
        dataSource: pivotGridDataSource
    }"></div>
</div>
angular.module('DemoApp', ['dx'])
    .controller("DemoController", function ($scope) {
        $scope.pivotGridDataSource = new DevExpress.data.PivotGridDataSource({
            // ...   
        });
    });
Knockout
HTML
JavaScript
<div data-bind="dxPivotGridFieldChooser: {
    dataSource: pivotGridDataSource
}"></div>
<div data-bind="dxPivotGrid: {
    dataSource: pivotGridDataSource  
}"></div>
var viewModel = {
    pivotGridDataSource: new DevExpress.data.PivotGridDataSource({
        // ...
    })
};
ko.applyBindings(viewModel);

Both the PivotGridFieldChooser and the PivotGrid must be bound to one and the same instance of the PivotGridDataSource. Create the PivotGridDataSource individually and then assign it to both widgets as shown in the code above.

View Demo

Configuration

This section describes the configuration options of the PivotGridFieldChooser widget.

Methods

This section describes the methods that can be used to manipulate the PivotGridFieldChooser widget.

Events

This section describes events fired by this widget.

See Also