Pivot

The Pivot provides a quick way to manage multiple views. It includes a collection of views and a navigation header. An end user switches the views by swiping them or by clicking their titles on the navigation header.

Included in: dx.mobile.js, dx.all.js
Module: ui/pivot
Export: default
Pivot interactive configuration
Copy Code
Copy to Codepen
$("#pivot").dxPivot({
});

You can create the widget using one of the following approaches.

  • jQuery

    HTML
    <div id="pivot"></div>
    JavaScript
    var pivotItems = [{
        title: "Main courses",
        text: "First and second courses of a meal"
    }, {
        title: "Seafood",
        text: "Seafood: ocean and sea"
    }, {
        title: "Desserts",
        text: "Desserts: biscuits and cookies"
    }, {
        title: "Drinks",
        text: "Drinks: soft vine and tea"
    }];
    $(function () {
        $("#pivot").dxPivot({
            items: pivotItems,
            height: 300
        });
    });
  • AngularJS

    HTML
    <div ng-controller="DemoController">
        <div dx-pivot="{
            items: pivotItems,
            height: 300
        }"></div>
    </div>
    JavaScript
    angular.module('DemoApp', ['dx'])
        .controller("DemoController", function ($scope) {
            $scope.pivotItems = [
                // ...   
            ];
        });
  • Knockout

    HTML
    <div data-bind="dxPivot: {
        items: pivotItems,
        height: 300
    }"></div>
    JavaScript
    var viewModel = {
        pivotItems: [
            // ...
        ]
    };
    ko.applyBindings(viewModel);

Note that DevExtreme widgets require you to link the jQuery library to your application. If you use the Knockout or AngularJS approach, the Knockout or AngularJS library is also required. For detailed information on linking these libraries to your project, refer to the topics in the Installation section.

View Demo Watch Video

See Also
Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the Pivot widget.

Methods

This section describes members used to manipulate the widget.

Events

This section describes events fired by this widget.

Default Item Template

This section lists the data source fields that are used in a default template for pivot items.

By default, a predefined item template is applied to display the items of this widget. This template is based on certain fields of the data source provided for this widget. Below is the list of these fields. If the default item template is not appropriate for your task, implement a custom item template based on these or other fields of your data source.

See Also