Accordion Configuration

An object defining configuration options for the dxAccordion widget.

accessKey

Specifies a shortcut key that sets focus on the widget element.

Type: String
Default Value: null

The accessKey option value is passed to the accesskey attribute of the actual HTML element of the widget.

activeStateEnabled

A Boolean value specifying whether or not the widget changes its state when interacting with a user.

Type: Boolean
Default Value: false

This option is used when the widget is displayed on a platform whose guidelines include the active state change for widgets.

animationDuration

A number specifying the time in milliseconds spent on the animation of the expanding or collapsing of a panel.

Type: Number
Default Value: 300

Show Example:
AngularJS
Knockout
jQuery
<div style="height:500px; max-width:750px; margin: 0 auto" dx-scroll-view="{ showScrollbar: 'always' }" ng-controller="demoController">
    <div class="wrapper">
        <p>Animation duration: <b>{{duration}}</b></p>
        <div dx-slider="{
            value: duration,
            min: 0,
            max: 2000
        }"></div>
        <div dx-accordion="{
            dataSource: accordionData,
            bindingOptions: {
                animationDuration: 'duration'
            }
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1>{{title}}</h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" ng-repeat="(key, value) in data">
                        <p>{{key}}: <b>{{value}}</b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.duration = 300;
    $scope.accordionData = new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" data-bind="dxScrollView: { showScrollbar: 'always' }">
    <div class="wrapper">
        <p>Animation duration: <b data-bind="text: duration"></b></p>
        <div data-bind="dxSlider:{
            value: duration,
            min: 0,
            max: 2000
        }"></div>
        <div data-bind="dxAccordion:{
            dataSource: accordionData,
            animationDuration: duration
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1 data-bind="text: $data.title"></h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" data-bind="foreach: dataArray">
                        <p><span data-bind="text: propertyKey"></span>: <b data-bind="text: propertyValue"></b></p>
                    </div>
                </div>
            </div>
        </div>
    </p>
</div>
var myViewModel = {
    duration: ko.observable(300),
    accordionData: new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
};
ko.applyBindings(myViewModel);
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" id="demoBox">
    <div class="wrapper">
        <p>Animation duration: <b id="durationValue">300</b></p>
        <div id="durationSelector"></div>
        <div id="myAccordion"></div>
    </div>
</div>
var accordionDataSource = new DevExpress.data.DataSource({
    store: [
        {
            title: "Personal Data",
            data: {
                firstName: "John",
                lastName: "Smith",
                birthYear: 1986,
            }
        },
        {
            title: "Contacts",
            data: {
                phone: "(555)555-5555",
                email: "John.Smith@example.com",
            }
        },
        {
            title: "Address",
            data: {
                state: "CA",
                city: "San Francisco",
                street: "Stanford Ave",
            }
        }
    ],
    map: function (itemData) {
        itemData.text = itemData.title;
        itemData.dataArray = $.map(itemData.data, function (value, key) {
            return {
                propertyKey: key,
                propertyValue: value
            }
        });
        return itemData;
    }
});
$("#myAccordion").dxAccordion({
    dataSource: accordionDataSource,
    itemTitleTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.append("<h1>" + itemData.title + "</h1>");
    },
    itemTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.addClass("item-body");
        var wrapper = $("<div style='margin: 25px;'>");
        itemElement.append(wrapper);
        var innerWrapper = $("<div style='text-align:left;'>");
        wrapper.append(innerWrapper);
        for (var field in itemData.data)
            innerWrapper.append("<p>" + field + ": <b>" + itemData.data[field] + "</b></p>");
    }
});
$("#demoBox").dxScrollView({
    showScrollbar: 'always'
});
$("#durationSelector").dxSlider({
    min: 0,
    max: 2000,
    value: 300,
    onValueChanged: function (e) {
        $("#durationValue").text(e.value);
        $("#myAccordion").dxAccordion("instance").option("animationDuration", e.value);
    }
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}

collapsible

Specifies whether all items can be collapsed or whether at least one item must always be expanded.

Type: Boolean
Default Value: false

Show Example:
AngularJS
Knockout
jQuery
<div style="height:500px; max-width:750px; margin: 0 auto" dx-scroll-view="{ showScrollbar: 'always' }" ng-controller="demoController">
    <div class="wrapper">
        <div class="checkBox" dx-check-box="{ bindingOptions: { value: 'collapsible' }, text: 'Collapsible' }"></div>
        <div dx-accordion="{
            dataSource: accordionData,
            bindingOptions: {
                collapsible: 'collapsible'
            }
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1>{{title}}</h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" ng-repeat="(key, value) in data">
                        <p>{{key}}: <b>{{value}}</b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.collapsible = false;
    $scope.accordionData = new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" data-bind="dxScrollView: { showScrollbar: 'always' }">
    <div class="wrapper">
        <div class="checkBox" data-bind="dxCheckBox: { value: collapsible, text: 'Collapsible' }"></div>
        <div data-bind="dxAccordion:{
            dataSource: accordionData,
            collapsible: collapsible
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1 data-bind="text: $data.title"></h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" data-bind="foreach: dataArray">
                        <p><span data-bind="text: propertyKey"></span>: <b data-bind="text: propertyValue"></b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myViewModel = {
    collapsible: ko.observable(false),
    accordionData: new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
};
ko.applyBindings(myViewModel);
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" id="demoBox">
    <div class="wrapper">
        <div class="checkBox" id="collapsibleCheckBox"></div>
        <div id="myAccordion"></div>
    </div>
</div>
var accordionDataSource = new DevExpress.data.DataSource({
    store: [
        {
            title: "Personal Data",
            data: {
                firstName: "John",
                lastName: "Smith",
                birthYear: 1986,
            }
        },
        {
            title: "Contacts",
            data: {
                phone: "(555)555-5555",
                email: "John.Smith@example.com",
            }
        },
        {
            title: "Address",
            data: {
                state: "CA",
                city: "San Francisco",
                street: "Stanford Ave",
            }
        }
    ],
    map: function (itemData) {
        itemData.text = itemData.title;
        itemData.dataArray = $.map(itemData.data, function (value, key) {
            return {
                propertyKey: key,
                propertyValue: value
            }
        });
        return itemData;
    }
});
$("#myAccordion").dxAccordion({
    dataSource: accordionDataSource,
    itemTitleTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.append("<h1>" + itemData.title + "</h1>");
    },
    itemTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.addClass("item-body");
        var wrapper = $("<div style='margin: 25px;'>");
        itemElement.append(wrapper);
        var innerWrapper = $("<div style='text-align:left;'>");
        wrapper.append(innerWrapper);
        for(var field in itemData.data)
            innerWrapper.append("<p>" + field + ": <b>" + itemData.data[field] + "</b></p>");
    }
});
$("#demoBox").dxScrollView({
    showScrollbar: 'always'
});
$("#collapsibleCheckBox").dxCheckBox({
    text: 'Collapsible',
    value: false,
    onValueChanged: function (e) {
        $("#myAccordion").dxAccordion("instance").option("collapsible", e.value);
    }
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}

dataSource

A data source used to fetch data to be displayed by the widget.

Default Value: null

You can assign an array directly to this option as well as use the Data Source provided by the DevExtreme library.

To display widget items, a default template can be used. This template is based on the data source fields that are listed in the Default Item Template section of the widget's API. Alternatively, you can implement a custom item template.

See Also
Show Example:
AngularJS
Knockout
jQuery
<div style="height:500px; max-width:750px; margin: 0 auto" dx-scroll-view="{ showScrollbar: 'always' }" ng-controller="demoController">
    <div class="wrapper">
        <div dx-accordion="{
            dataSource: accordionData
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1>{{title}}</h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" ng-repeat="(key, value) in data">
                        <p>{{key}}: <b>{{value}}</b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.accordionData = new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" data-bind="dxScrollView: { showScrollbar: 'always' }">
    <div class="wrapper">
        <div data-bind="dxAccordion:{
            dataSource: accordionData
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1 data-bind="text: $data.title"></h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" data-bind="foreach: dataArray">
                        <p><span data-bind="text: propertyKey"></span>: <b data-bind="text: propertyValue"></b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myViewModel = {
    accordionData: new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
};
ko.applyBindings(myViewModel);
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" id="demoBox">
    <div class="wrapper">
        <div id="myAccordion"></div>
    </div>
</div>
var accordionDataSource = new DevExpress.data.DataSource({
    store: [
        {
            title: "Personal Data",
            data: {
                firstName: "John",
                lastName: "Smith",
                birthYear: 1986,
            }
        },
        {
            title: "Contacts",
            data: {
                phone: "(555)555-5555",
                email: "John.Smith@example.com",
            }
        },
        {
            title: "Address",
            data: {
                state: "CA",
                city: "San Francisco",
                street: "Stanford Ave",
            }
        }
    ],
    map: function (itemData) {
        itemData.text = itemData.title;
        itemData.dataArray = $.map(itemData.data, function (value, key) {
            return {
                propertyKey: key,
                propertyValue: value
            }
        });
        return itemData;
    }
});
$("#myAccordion").dxAccordion({
    dataSource: accordionDataSource,
    itemTitleTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.append("<h1>" + itemData.title + "</h1>");
    },
    itemTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.addClass("item-body");
        var wrapper = $("<div style='margin: 25px;'>");
        itemElement.append(wrapper);
        var innerWrapper = $("<div style='text-align:left;'>");
        wrapper.append(innerWrapper);
        for (var field in itemData.data)
            innerWrapper.append("<p>" + field + ": <b>" + itemData.data[field] + "</b></p>");
    }
});
$("#demoBox").dxScrollView({
    showScrollbar: 'always'
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}

deferRendering

Specifies whether widget content is rendered when the widget is shown or when rendering the widget.

Type: Boolean
Default Value: true

If this option is set to true, widget content is rendered when showing the widget. Otherwise, widget content is rendered when rendering the widget.

disabled

A Boolean value specifying whether or not the widget can respond to user interaction.

Type: Boolean
Default Value: false

Create an observable variable and assign it to this option to specify the availability of the widget at runtime.

Show Example:
AngularJS
Knockout
jQuery
<div style="height:500px; max-width:750px; margin: 0 auto" dx-scroll-view="{ showScrollbar: 'always' }" ng-controller="demoController">
    <div class="wrapper">
        <div class="checkBox" dx-check-box="{ bindingOptions: { value: 'disabled' }, text: 'Disabled' }"></div>
        <div dx-accordion="{
            dataSource: accordionData,
            bindingOptions: {
                disabled: 'disabled'
            }
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1>{{title}}</h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" ng-repeat="(key, value) in data">
                        <p>{{key}}: <b>{{value}}</b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.disabled = false;
    $scope.accordionData = new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" data-bind="dxScrollView: { showScrollbar: 'always' }">
    <div class="wrapper">
        <div class="checkBox" data-bind="dxCheckBox: { value: disabled, text: 'Disabled' }"></div>
        <div data-bind="dxAccordion:{
            dataSource: accordionData,
            disabled: disabled
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1 data-bind="text: $data.title"></h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" data-bind="foreach: dataArray">
                        <p><span data-bind="text: propertyKey"></span>: <b data-bind="text: propertyValue"></b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myViewModel = {
    disabled: ko.observable(false),
    accordionData: new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
};
ko.applyBindings(myViewModel);
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" id="demoBox">
    <div class="wrapper">
        <div class="checkBox" id="disabledCheckBox"></div>
        <div id="myAccordion"></div>
    </div>
</div>
var accordionDataSource = new DevExpress.data.DataSource({
    store: [
        {
            title: "Personal Data",
            data: {
                firstName: "John",
                lastName: "Smith",
                birthYear: 1986,
            }
        },
        {
            title: "Contacts",
            data: {
                phone: "(555)555-5555",
                email: "John.Smith@example.com",
            }
        },
        {
            title: "Address",
            data: {
                state: "CA",
                city: "San Francisco",
                street: "Stanford Ave",
            }
        }
    ],
    map: function (itemData) {
        itemData.text = itemData.title;
        itemData.dataArray = $.map(itemData.data, function (value, key) {
            return {
                propertyKey: key,
                propertyValue: value
            }
        });
        return itemData;
    }
});
$("#myAccordion").dxAccordion({
    dataSource: accordionDataSource,
    itemTitleTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.append("<h1>" + itemData.title + "</h1>");
    },
    itemTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.addClass("item-body");
        var wrapper = $("<div style='margin: 25px;'>");
        itemElement.append(wrapper);
        var innerWrapper = $("<div style='text-align:left;'>");
        wrapper.append(innerWrapper);
        for (var field in itemData.data)
            innerWrapper.append("<p>" + field + ": <b>" + itemData.data[field] + "</b></p>");
    }
});
$("#demoBox").dxScrollView({
    showScrollbar: 'always'
});
$("#disabledCheckBox").dxCheckBox({
    text: 'Disabled',
    value: false,
    onValueChanged: function (e) {
        $("#myAccordion").dxAccordion("instance").option("disabled", e.value);
    }
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}

focusStateEnabled

Specifies whether or not the widget can be focused.

Type: Boolean
Default Value: false

height

Specifies the height of the widget.

Type: Number|String|function
Return Value: Number|String
The widget height in a numeric or string format.
Default Value: undefined

The option can hold a value of the following types.

  • number
    The height of the widget in pixels

  • string
    A CSS measurement of the widget height (e.g., "55px", "80%", "auto" and "inherit")

  • function
    A function returning the widget height (e.g., height:function(){ return baseHeight - 10 + "%"; })

hint

Specifies the text of the hint displayed for the widget.

Type: String
Default Value: undefined

Show Example:
AngularJS
Knockout
jQuery
<div style="height:500px; max-width:750px; margin: 0 auto" dx-scroll-view="{ showScrollbar: 'always' }" ng-controller="demoController">
    <div class="wrapper">
        <div dx-accordion="{
            dataSource: accordionData,
            hint: 'A dxAccordion widget'
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1>{{title}}</h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" ng-repeat="(key, value) in data">
                        <p>{{key}}: <b>{{value}}</b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.accordionData = new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" data-bind="dxScrollView: { showScrollbar: 'always' }">
    <div class="wrapper">
        <div data-bind="dxAccordion:{
            dataSource: accordionData,
            hint: 'A dxAccordion widget'
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1 data-bind="text: $data.title"></h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" data-bind="foreach: dataArray">
                        <p><span data-bind="text: propertyKey"></span>: <b data-bind="text: propertyValue"></b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myViewModel = {
    accordionData: new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
};
ko.applyBindings(myViewModel);
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" id="demoBox">
    <div class="wrapper">
        <div id="myAccordion"></div>
    </div>
</div>
var accordionDataSource = new DevExpress.data.DataSource({
    store: [
        {
            title: "Personal Data",
            data: {
                firstName: "John",
                lastName: "Smith",
                birthYear: 1986,
            }
        },
        {
            title: "Contacts",
            data: {
                phone: "(555)555-5555",
                email: "John.Smith@example.com",
            }
        },
        {
            title: "Address",
            data: {
                state: "CA",
                city: "San Francisco",
                street: "Stanford Ave",
            }
        }
    ],
    map: function (itemData) {
        itemData.text = itemData.title;
        itemData.dataArray = $.map(itemData.data, function (value, key) {
            return {
                propertyKey: key,
                propertyValue: value
            }
        });
        return itemData;
    }
});
$("#myAccordion").dxAccordion({
    dataSource: accordionDataSource,
    hint: 'A dxAccordion widget',
    itemTitleTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.append("<h1>" + itemData.title + "</h1>");
    },
    itemTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.addClass("item-body");
        var wrapper = $("<div style='margin: 25px;'>");
        itemElement.append(wrapper);
        var innerWrapper = $("<div style='text-align:left;'>");
        wrapper.append(innerWrapper);
        for (var field in itemData.data)
            innerWrapper.append("<p>" + field + ": <b>" + itemData.data[field] + "</b></p>");
    }
});
$("#demoBox").dxScrollView({
    showScrollbar: 'always'
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}

hoverStateEnabled

A Boolean value specifying whether or not the widget changes its state when being hovered by an end user.

Type: Boolean
Default Value: false

itemHoldTimeout

The time period in milliseconds before the onItemHold event is raised.

Type: Number
Default Value: 750

items

An array of items displayed by the widget.

Type: Array

You can use the dataSource option instead. Unlike the items option, the dataSource option can take on the DataSource configuration object as well as a simple array.

To display widget items, a default template can be used. This template is based on the data source fields that are listed in the Default Item Template section of the widget's API. Alternatively, you can implement a custom item template.

See Also

itemTemplate

The template to be used for rendering dxAccordion items.

Type: String|function|DOM Node|jQuery
Function parameters:
itemData: Object
The item object to be rendered.
itemIndex: Number
The index of the item to be rendered.
itemElement: Object
An HTML element of the item to be rendered.
Return Value: String|DOM Node|jQuery
A template name or a template container.
Default Value: "item"
See Also

NOTE: A binding context of an item template is the data source object that corresponds to the currently rendered item. So, you can bind template elements to the item object's fields directly (see the code above). To access another binding context within an item template, use the Knockout/Angular binding variables.

Show Example:
AngularJS
Knockout
jQuery
<div style="height:500px; max-width:750px; margin: 0 auto" dx-scroll-view="{ showScrollbar: 'always' }" ng-controller="demoController">
    <div class="wrapper">
        <p>Use the following item template</p>
        <div class="box" dx-select-box="{
            dataSource: templates,
            bindingOptions: {
                value: 'currentTemplate'
            }
        }"></div>
        <div dx-accordion="{
            dataSource: accordionData,
            bindingOptions: {
                itemTemplate: 'currentTemplate'
            }
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1>{{title}}</h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'template1' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" ng-repeat="(key, value) in data">
                        <p>{{key}}: <b>{{value}}</b></p>
                    </div>
                </div>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'template2' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" ng-repeat="(key, value) in data">
                        <p><span style="color:blue;">{{value}}</span> (<i>{{key}}</i>)</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.templates = ["template1", "template2"];
    $scope.currentTemplate = "template1";
    $scope.accordionData = new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
.wrapper{
    padding: 20px;
}
.box{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" data-bind="dxScrollView: { showScrollbar: 'always' }">
    <div class="wrapper">
        <p>Use the following item template</p>
        <div class="box" data-bind="dxSelectBox: {
            dataSource: templates,
            value: currentTemplate
        }"></div>
        <div data-bind="dxAccordion:{
            dataSource: accordionData,
            itemTemplate: currentTemplate
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1 data-bind="text: $data.title"></h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'template1' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" data-bind="foreach: dataArray">
                        <p><span data-bind="text: propertyKey"></span>: <b data-bind="text: propertyValue"></b></p>
                    </div>
                </div>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'template2' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" data-bind="foreach: dataArray">
                        <p><span style="color:blue;" data-bind="text: propertyValue"></span> (<i data-bind="text: propertyKey"></i>)</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myViewModel = {
    templates: ["template1", "template2"],
    currentTemplate: ko.observable("template1"),
    accordionData: new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
};
ko.applyBindings(myViewModel);
.wrapper{
    padding: 20px;
}
.box{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" id="demoBox">
    <div class="wrapper">
        <p>Use the following item template</p>
        <div class="box" id="templateSelector"></div>
        <div id="myAccordion"></div>
    </div>
</div>
var accordionDataSource = new DevExpress.data.DataSource({
    store: [
        {
            title: "Personal Data",
            data: {
                firstName: "John",
                lastName: "Smith",
                birthYear: 1986,
            }
        },
        {
            title: "Contacts",
            data: {
                phone: "(555)555-5555",
                email: "John.Smith@example.com",
            }
        },
        {
            title: "Address",
            data: {
                state: "CA",
                city: "San Francisco",
                street: "Stanford Ave",
            }
        }
    ],
    map: function (itemData) {
        itemData.text = itemData.title;
        itemData.dataArray = $.map(itemData.data, function (value, key) {
            return {
                propertyKey: key,
                propertyValue: value
            }
        });
        return itemData;
    }
});
var itemTemplate1 = function (itemData, itemIndex, itemElement) {
    itemElement.addClass("item-body");
    var wrapper = $("<div style='margin: 25px;'>");
    itemElement.append(wrapper);
    var innerWrapper = $("<div style='text-align:left;'>");
    wrapper.append(innerWrapper);
    for (var field in itemData.data)
        innerWrapper.append("<p>" + field + ": <b>" + itemData.data[field] + "</b></p>");
};
var itemTemplate2 = function (itemData, itemIndex, itemElement) {
    itemElement.addClass("item-body");
    var wrapper = $("<div style='margin: 25px;'>");
    itemElement.append(wrapper);
    var innerWrapper = $("<div style='text-align:left;'>");
    wrapper.append(innerWrapper);
    for (var field in itemData.data)
        innerWrapper.append("<p><span style=\"color:blue;\">" + itemData.data[field] + "</span> (<i>" + field + "</i>)</p>");
};
$("#templateSelector").dxSelectBox({
    dataSource: ["template1", "template2"],
    value: "template1",
    onValueChanged: function (e) {
        var accordion = $("#myAccordion").dxAccordion("instance");
        accordion.option("itemTemplate", e.value == "template1" ? itemTemplate1 : itemTemplate2);
    }
});
$("#myAccordion").dxAccordion({
    dataSource: accordionDataSource,
    itemTitleTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.append("<h1>" + itemData.title + "</h1>");
    },
    itemTemplate: itemTemplate1
});
$("#demoBox").dxScrollView({
    showScrollbar: 'always'
});
.wrapper{
    padding: 20px;
}
.box{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}

itemTitleTemplate

The template to be used for rendering an item title.

Type: String|function|DOM Node|jQuery
Function parameters:
itemData: Object
The item object to be rendered.
itemIndex: Number
The index of the item to be rendered.
itemElement: jQuery
An HTML element of the item to be rendered.
Return Value: String|DOM Node|jQuery
A template name or a template container.
Default Value: "title"

NOTE: A binding context of an item title template is the data source object that corresponds to the currently rendered item. So, you can bind template elements to the item object's fields directly (see the code above). To access another binding context within an item title template, use the Knockout/Angular binding variables.

See Also
Show Example:
AngularJS
Knockout
jQuery
<div style="height:500px; max-width:750px; margin: 0 auto" dx-scroll-view="{ showScrollbar: 'always' }" ng-controller="demoController">
    <div class="wrapper">
        <p>Use the following item template</p>
        <div class="box" dx-select-box="{
            dataSource: templates,
            bindingOptions: {
                value: 'currentTemplate'
            }
        }"></div>
        <div dx-accordion="{
            dataSource: accordionData,
            bindingOptions: {
                itemTitleTemplate: 'currentTemplate'
            }
        }">
            <div data-options="dxTemplate : { name: 'template1' } ">
                <h1>{{title}}</h1>
            </div>
            <div data-options="dxTemplate : { name: 'template2' } ">
                <p><b>{{title}}</b> (
                    <span class="inline-item" ng-repeat="(key, value) in data">
                        <i>{{key}}</i>
                    </span>
                )</p>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" ng-repeat="(key, value) in data">
                        <p>{{key}}: <b>{{value}}</b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.templates = ["template1", "template2"];
    $scope.currentTemplate = "template1";
    $scope.accordionData = new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
.wrapper{
    padding: 20px;
}
.box{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
.inline-item:not(:last-child):after{
    content: ",";
}
<div style="height:500px; max-width:750px; margin: 0 auto" data-bind="dxScrollView: { showScrollbar: 'always' }">
    <div class="wrapper">
        <p>Use the following item title template</p>
        <div class="box" data-bind="dxSelectBox: {
            dataSource: templates,
            value: currentTemplate
        }"></div>
        <div data-bind="dxAccordion:{
            dataSource: accordionData,
            itemTitleTemplate: currentTemplate
        }">
            <div data-options="dxTemplate : { name: 'template1' } ">
                <h1 data-bind="text: title"></h1>
            </div>
            <div data-options="dxTemplate : { name: 'template2' } ">
                <p><b data-bind="text: title"></b> (
                    <span data-bind="foreach: dataArray">
                        <i class="inline-item" data-bind="text: propertyKey"></i>
                    </span>
                )</p>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" data-bind="foreach: dataArray">
                        <p><span data-bind="text: propertyKey"></span>: <b data-bind="text: propertyValue"></b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myViewModel = {
    templates: ["template1", "template2"],
    currentTemplate: ko.observable("template1"),
    accordionData: new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
};
ko.applyBindings(myViewModel);
.wrapper{
    padding: 20px;
}
.box{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
.inline-item:not(:last-child):after{
    content: ",";
}
<div style="height:500px; max-width:750px; margin: 0 auto" id="demoBox">
    <div class="wrapper">
        <p>Use the following item template</p>
        <div class="box" id="templateSelector"></div>
        <div id="myAccordion"></div>
    </div>
</div>
var accordionDataSource = new DevExpress.data.DataSource({
    store: [
        {
            title: "Personal Data",
            data: {
                firstName: "John",
                lastName: "Smith",
                birthYear: 1986,
            }
        },
        {
            title: "Contacts",
            data: {
                phone: "(555)555-5555",
                email: "John.Smith@example.com",
            }
        },
        {
            title: "Address",
            data: {
                state: "CA",
                city: "San Francisco",
                street: "Stanford Ave",
            }
        }
    ],
    map: function (itemData) {
        itemData.text = itemData.title;
        itemData.dataArray = $.map(itemData.data, function (value, key) {
            return {
                propertyKey: key,
                propertyValue: value
            }
        });
        return itemData;
    }
});
var titleTemplate1 = function (itemData, itemIndex, itemElement) {
    itemElement.append("<h1>" + itemData.title + "</h1>");
};
var titleTemplate2 = function (itemData, itemIndex, itemElement) {
    var titleParagraph = $("<p><b>" + itemData.title + "</b></p>");
    var itemWrapper = $("<span>");
    itemWrapper.append("(");
    for (var field in itemData.data)
        itemWrapper.append("<span class=\"inline-item\">" + field + "</span> ");
    itemWrapper.append(")");
    titleParagraph.append(itemWrapper);
    itemElement.append(titleParagraph);
};
$("#templateSelector").dxSelectBox({
    dataSource: ["template1", "template2"],
    value: "template1",
    onValueChanged: function (e) {
        var accordion = $("#myAccordion").dxAccordion("instance");
        accordion.option("itemTitleTemplate", e.value == "template1" ? titleTemplate1 : titleTemplate2);
    }
});
$("#myAccordion").dxAccordion({
    dataSource: accordionDataSource,
    itemTitleTemplate: titleTemplate1,
    itemTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.addClass("item-body");
        var wrapper = $("<div style='margin: 25px;'>");
        itemElement.append(wrapper);
        var innerWrapper = $("<div style='text-align:left;'>");
        wrapper.append(innerWrapper);
        for (var field in itemData.data)
            innerWrapper.append("<p>" + field + ": <b>" + itemData.data[field] + "</b></p>");
    }
});
$("#demoBox").dxScrollView({
    showScrollbar: 'always'
});
.wrapper{
    padding: 20px;
}
.box{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
.inline-item:not(:last-child):after{
    content: ",";
}

multiple

Specifies whether the widget can expand several items or only a single item at once.

Type: Boolean
Default Value: false

Show Example:
AngularJS
Knockout
jQuery
<div style="height:500px; max-width:750px; margin: 0 auto" dx-scroll-view="{ showScrollbar: 'always' }" ng-controller="demoController">
    <div class="wrapper">
        <div class="checkBox" dx-check-box="{ bindingOptions: { value: 'multiple' }, text: 'Multiple' }"></div>
        <div dx-accordion="{
            dataSource: accordionData,
            bindingOptions: {
                collapsible: 'collapsible',
                multiple: 'multiple'
            }
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1>{{title}}</h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" ng-repeat="(key, value) in data">
                        <p>{{key}}: <b>{{value}}</b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.multiple = false;
    $scope.accordionData = new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" data-bind="dxScrollView: { showScrollbar: 'always' }">
    <div class="wrapper">
        <div class="checkBox" data-bind="dxCheckBox: { value: multiple, text: 'Multiple' }"></div>
        <div data-bind="dxAccordion:{
            dataSource: accordionData,
            collapsible: collapsible,
            multiple: multiple
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1 data-bind="text: $data.title"></h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" data-bind="foreach: dataArray">
                        <p><span data-bind="text: propertyKey"></span>: <b data-bind="text: propertyValue"></b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myViewModel = {
    multiple: ko.observable(false),
    accordionData: new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
};
ko.applyBindings(myViewModel);
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" id="demoBox">
    <div class="wrapper">
        <div class="checkBox" id="multipleCheckBox"></div>
        <div id="myAccordion"></div>
    </div>
</div>
var accordionDataSource = new DevExpress.data.DataSource({
    store: [
        {
            title: "Personal Data",
            data: {
                firstName: "John",
                lastName: "Smith",
                birthYear: 1986,
            }
        },
        {
            title: "Contacts",
            data: {
                phone: "(555)555-5555",
                email: "John.Smith@example.com",
            }
        },
        {
            title: "Address",
            data: {
                state: "CA",
                city: "San Francisco",
                street: "Stanford Ave",
            }
        }
    ],
    map: function (itemData) {
        itemData.text = itemData.title;
        itemData.dataArray = $.map(itemData.data, function (value, key) {
            return {
                propertyKey: key,
                propertyValue: value
            }
        });
        return itemData;
    }
});
$("#myAccordion").dxAccordion({
    dataSource: accordionDataSource,
    itemTitleTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.append("<h1>" + itemData.title + "</h1>");
    },
    itemTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.addClass("item-body");
        var wrapper = $("<div style='margin: 25px;'>");
        itemElement.append(wrapper);
        var innerWrapper = $("<div style='text-align:left;'>");
        wrapper.append(innerWrapper);
        for(var field in itemData.data)
            innerWrapper.append("<p>" + field + ": <b>" + itemData.data[field] + "</b></p>");
    }
});
$("#demoBox").dxScrollView({
    showScrollbar: 'always'
});
$("#multipleCheckBox").dxCheckBox({
    text: 'Multiple',
    value: false,
    onValueChanged: function (e) {
        $("#myAccordion").dxAccordion("instance").option("multiple", e.value);
    }
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}

noDataText

The text or HTML markup displayed by the widget if the item collection is empty.

Type: String
Default Value: "No data to display"

onContentReady

A handler for the contentReady event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element. Available only in the Knockout and AngularJS approaches.
Default Value: null

Assign a function to perform a custom action when widget content is ready.

onDisposing

A handler for the disposing event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element. Available only in the Knockout and AngularJS approaches.
Default Value: null

onInitialized

A handler for the initialized event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
Default Value: null

Assign a function to perform a custom action when the widget is initialized.

onItemClick

A handler for the itemClick event.

Type: function|String
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element. Available only in the Knockout and AngularJS approaches.
itemData: Object
The data that is bound to the clicked item.
itemElement: jQuery
An HTML element of the item.
itemIndex: Number
Specifies the index of the clicked item.
jQueryEvent: jQuery.Event
Specifies the jQuery event that caused action execution.
Default Value: null

Assign a function to perform a custom action when a widget item is clicked.

To navigate to a specific URL when the itemClick event fires, assign that URL or the anchor part (#) of that URL directly to this option as a string.

Show Example:
AngularJS
Knockout
jQuery
<div style="height:500px; max-width:750px; margin: 0 auto" dx-scroll-view="{ showScrollbar: 'always' }" ng-controller="demoController">
    <div class="wrapper">
        <p>Click an item</p>
        <div dx-accordion="{
            dataSource: accordionData,
            onItemClick: itemClicked
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1>{{title}}</h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" ng-repeat="(key, value) in data">
                        <p>{{key}}: <b>{{value}}</b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.accordionData = new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    });
    $scope.itemClicked = function (e) {
        DevExpress.ui.notify("The \"" + e.itemData.title + "\" item is clicked", "info", 2000);
    };
});

angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" data-bind="dxScrollView: { showScrollbar: 'always' }">
    <div class="wrapper">
        <p>Click an item</p>
        <div data-bind="dxAccordion:{
            dataSource: accordionData,
            onItemClick: itemClicked
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1 data-bind="text: $data.title"></h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" data-bind="foreach: dataArray">
                        <p><span data-bind="text: propertyKey"></span>: <b data-bind="text: propertyValue"></b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myViewModel = {
    accordionData: new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    }),
    itemClicked: function (e) {
        DevExpress.ui.notify("The \"" + e.itemData.title + "\" item is clicked", "info", 2000);
    }
};
ko.applyBindings(myViewModel);
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" id="demoBox">
    <div class="wrapper">
        <p>Click an item</p>
        <div id="myAccordion"></div>
    </div>
</div>
var accordionDataSource = new DevExpress.data.DataSource({
    store: [
        {
            title: "Personal Data",
            data: {
                firstName: "John",
                lastName: "Smith",
                birthYear: 1986,
            }
        },
        {
            title: "Contacts",
            data: {
                phone: "(555)555-5555",
                email: "John.Smith@example.com",
            }
        },
        {
            title: "Address",
            data: {
                state: "CA",
                city: "San Francisco",
                street: "Stanford Ave",
            }
        }
    ],
    map: function (itemData) {
        itemData.text = itemData.title;
        itemData.dataArray = $.map(itemData.data, function (value, key) {
            return {
                propertyKey: key,
                propertyValue: value
            }
        });
        return itemData;
    }
});
$("#myAccordion").dxAccordion({
    dataSource: accordionDataSource,
    onItemClick: function (e) {
        DevExpress.ui.notify("The \"" + e.itemData.title + "\" item is clicked", "info", 2000);
    },
    itemTitleTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.append("<h1>" + itemData.title + "</h1>");
    },
    itemTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.addClass("item-body");
        var wrapper = $("<div style='margin: 25px;'>");
        itemElement.append(wrapper);
        var innerWrapper = $("<div style='text-align:left;'>");
        wrapper.append(innerWrapper);
        for (var field in itemData.data)
            innerWrapper.append("<p>" + field + ": <b>" + itemData.data[field] + "</b></p>");
    }
});
$("#demoBox").dxScrollView({
    showScrollbar: 'always'
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}

onItemContextMenu

A handler for the itemContextMenu event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element. Available only in the Knockout and AngularJS approaches.
itemData: Object
The data that is bound to the item.
itemElement: jQuery
An HTML element of the item.
itemIndex: Number
Specifies the index of the item.
jQueryEvent: jQuery.Event
Specifies the jQuery event that caused action execution.
Default Value: null

Assign a function to perform a custom action when the right mouse button is clicked when the pointer is over a widget item, or when the "sustained" (also known as a long press) touch action is performed.

Show Example:
AngularJS
Knockout
jQuery
<div style="height:500px; max-width:750px; margin: 0 auto" dx-scroll-view="{ showScrollbar: 'always' }" ng-controller="demoController">
    <div class="wrapper">
        <p>Right-click an item</p>
        <div dx-accordion="{
            dataSource: accordionData,
            onItemContextMenu: itemContextMenu
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1>{{title}}</h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" ng-repeat="(key, value) in data">
                        <p>{{key}}: <b>{{value}}</b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.accordionData = new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    });
    $scope.itemContextMenu = function (e) {
        DevExpress.ui.notify("The right mouse button is clicked over the \"" + e.itemData.title + "\" item", "info", 2000);
    };
});

angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" data-bind="dxScrollView: { showScrollbar: 'always' }">
    <div class="wrapper">
        <p>Right-click an item</p>
        <div data-bind="dxAccordion:{
            dataSource: accordionData,
            onItemContextMenu: itemContextMenu
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1 data-bind="text: $data.title"></h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" data-bind="foreach: dataArray">
                        <p><span data-bind="text: propertyKey"></span>: <b data-bind="text: propertyValue"></b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myViewModel = {
    accordionData: new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    }),
    itemContextMenu: function (e) {
        DevExpress.ui.notify("The right mouse button is clicked over the \"" + e.itemData.title + "\" item", "info", 2000);
    }
};
ko.applyBindings(myViewModel);
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" id="demoBox">
    <div class="wrapper">
        <p>Right-click an item</p>
        <div id="myAccordion"></div>
    </div>
</div>
var accordionDataSource = new DevExpress.data.DataSource({
    store: [
        {
            title: "Personal Data",
            data: {
                firstName: "John",
                lastName: "Smith",
                birthYear: 1986,
            }
        },
        {
            title: "Contacts",
            data: {
                phone: "(555)555-5555",
                email: "John.Smith@example.com",
            }
        },
        {
            title: "Address",
            data: {
                state: "CA",
                city: "San Francisco",
                street: "Stanford Ave",
            }
        }
    ],
    map: function (itemData) {
        itemData.text = itemData.title;
        itemData.dataArray = $.map(itemData.data, function (value, key) {
            return {
                propertyKey: key,
                propertyValue: value
            }
        });
        return itemData;
    }
});
$("#myAccordion").dxAccordion({
    dataSource: accordionDataSource,
    onItemContextMenu: function (e) {
        DevExpress.ui.notify("The right mouse button is clicked over the \"" + e.itemData.title + "\" item", "info", 2000);
    },
    itemTitleTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.append("<h1>" + itemData.title + "</h1>");
    },
    itemTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.addClass("item-body");
        var wrapper = $("<div style='margin: 25px;'>");
        itemElement.append(wrapper);
        var innerWrapper = $("<div style='text-align:left;'>");
        wrapper.append(innerWrapper);
        for (var field in itemData.data)
            innerWrapper.append("<p>" + field + ": <b>" + itemData.data[field] + "</b></p>");
    }
});
$("#demoBox").dxScrollView({
    showScrollbar: 'always'
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}

onItemHold

A handler for the itemHold event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element. Available only in the Knockout and AngularJS approaches.
itemData: Object
The data that is bound to the item being held.
itemElement: jQuery
An HTML element of the item.
itemIndex: Number
Specifies the index of the item being held.
Default Value: null

Assign a function to perform a custom action when the widget's collection item is being held for a specified time period (see the itemHoldTimeout option).

Show Example:
AngularJS
Knockout
jQuery
<div style="height:500px; max-width:750px; margin: 0 auto" dx-scroll-view="{ showScrollbar: 'always' }" ng-controller="demoController">
    <div class="wrapper">
        <p>Hold an item</p>
        <div dx-accordion="{
            dataSource: accordionData,
            onItemHold: itemHeld
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1>{{title}}</h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" ng-repeat="(key, value) in data">
                        <p>{{key}}: <b>{{value}}</b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.accordionData = new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    });
    $scope.itemHeld = function (e) {
        DevExpress.ui.notify("The \"" + e.itemData.title + "\" item is held", "info", 2000);
    };
});

angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" data-bind="dxScrollView: { showScrollbar: 'always' }">
    <div class="wrapper">
        <p>Hold an item</p>
        <div data-bind="dxAccordion:{
            dataSource: accordionData,
            onItemHold: itemHeld
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1 data-bind="text: $data.title"></h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" data-bind="foreach: dataArray">
                        <p><span data-bind="text: propertyKey"></span>: <b data-bind="text: propertyValue"></b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myViewModel = {
    accordionData: new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    }),
    itemHeld: function (e) {
        DevExpress.ui.notify("The \"" + e.itemData.title + "\" item is held", "info", 2000);
    }
};
ko.applyBindings(myViewModel);
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" id="demoBox">
    <div class="wrapper">
        <p>Hold an item</p>
        <div id="myAccordion"></div>
    </div>
</div>
var accordionDataSource = new DevExpress.data.DataSource({
    store: [
        {
            title: "Personal Data",
            data: {
                firstName: "John",
                lastName: "Smith",
                birthYear: 1986,
            }
        },
        {
            title: "Contacts",
            data: {
                phone: "(555)555-5555",
                email: "John.Smith@example.com",
            }
        },
        {
            title: "Address",
            data: {
                state: "CA",
                city: "San Francisco",
                street: "Stanford Ave",
            }
        }
    ],
    map: function (itemData) {
        itemData.text = itemData.title;
        itemData.dataArray = $.map(itemData.data, function (value, key) {
            return {
                propertyKey: key,
                propertyValue: value
            }
        });
        return itemData;
    }
});
$("#myAccordion").dxAccordion({
    dataSource: accordionDataSource,
    onItemHold: function (e) {
        DevExpress.ui.notify("The \"" + e.itemData.title + "\" item is held", "info", 2000);
    },
    itemTitleTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.append("<h1>" + itemData.title + "</h1>");
    },
    itemTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.addClass("item-body");
        var wrapper = $("<div style='margin: 25px;'>");
        itemElement.append(wrapper);
        var innerWrapper = $("<div style='text-align:left;'>");
        wrapper.append(innerWrapper);
        for (var field in itemData.data)
            innerWrapper.append("<p>" + field + ": <b>" + itemData.data[field] + "</b></p>");
    }
});
$("#demoBox").dxScrollView({
    showScrollbar: 'always'
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}

onItemRendered

A handler for the itemRendered event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data available for binding against the element. Available only in the Knockout and AngularJS approaches.
itemData: Object
The data that is bound to the item to be rendered.
itemElement: jQuery
An HTML element of the item.
itemIndex: Number
Specifies the index of the rendered item.
Default Value: null

Assign a function to perform a custom action after a collection item is rendered.

onItemTitleClick

A handler for the itemTitleClick event.

Type: function|String
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element. Available only in the Knockout and AngularJS approaches.
itemData: Object
The data that is bound to the clicked item.
itemElement: jQuery
An HTML element of the item.
itemIndex: Number
Specifies the index of the clicked item.
Default Value: null

Show Example:
AngularJS
Knockout
jQuery
<div style="height:500px; max-width:750px; margin: 0 auto" dx-scroll-view="{ showScrollbar: 'always' }" ng-controller="demoController">
    <div class="wrapper">
        <p>Click an item title</p>
        <div dx-accordion="{
            dataSource: accordionData,
            onItemTitleClick: titleClicked
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1>{{title}}</h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" ng-repeat="(key, value) in data">
                        <p>{{key}}: <b>{{value}}</b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.accordionData = new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    });
    $scope.titleClicked = function (e) {
        DevExpress.ui.notify("The \"" + e.itemData.title + "\" item title is clicked", "info", 2000);
    };
});

angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" data-bind="dxScrollView: { showScrollbar: 'always' }">
    <div class="wrapper">
        <p>Click an item title</p>
        <div data-bind="dxAccordion:{
            dataSource: accordionData,
            onItemTitleClick: titleClicked
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1 data-bind="text: $data.title"></h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" data-bind="foreach: dataArray">
                        <p><span data-bind="text: propertyKey"></span>: <b data-bind="text: propertyValue"></b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myViewModel = {
    accordionData: new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    }),
    titleClicked: function (e) {
        DevExpress.ui.notify("The \"" + e.itemData.title + "\" item title is clicked", "info", 2000);
    }
};
ko.applyBindings(myViewModel);
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" id="demoBox">
    <div class="wrapper">
        <p>Click an item title</p>
        <div id="myAccordion"></div>
    </div>
</div>
var accordionDataSource = new DevExpress.data.DataSource({
    store: [
        {
            title: "Personal Data",
            data: {
                firstName: "John",
                lastName: "Smith",
                birthYear: 1986,
            }
        },
        {
            title: "Contacts",
            data: {
                phone: "(555)555-5555",
                email: "John.Smith@example.com",
            }
        },
        {
            title: "Address",
            data: {
                state: "CA",
                city: "San Francisco",
                street: "Stanford Ave",
            }
        }
    ],
    map: function (itemData) {
        itemData.text = itemData.title;
        itemData.dataArray = $.map(itemData.data, function (value, key) {
            return {
                propertyKey: key,
                propertyValue: value
            }
        });
        return itemData;
    }
});
$("#myAccordion").dxAccordion({
    dataSource: accordionDataSource,
    onItemTitleClick: function (e) {
        DevExpress.ui.notify("The \"" + e.itemData.title + "\" item title is clicked", "info", 2000);
    },
    itemTitleTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.append("<h1>" + itemData.title + "</h1>");
    },
    itemTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.addClass("item-body");
        var wrapper = $("<div style='margin: 25px;'>");
        itemElement.append(wrapper);
        var innerWrapper = $("<div style='text-align:left;'>");
        wrapper.append(innerWrapper);
        for (var field in itemData.data)
            innerWrapper.append("<p>" + field + ": <b>" + itemData.data[field] + "</b></p>");
    }
});
$("#demoBox").dxScrollView({
    showScrollbar: 'always'
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}

onItemTitleHold

A handler for the itemTitleHold event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element. Available only in the Knockout and AngularJS approaches.
itemData: Object
The data that is bound to the clicked item.
itemElement: jQuery
An HTML element of the item.
itemIndex: Number
Specifies the index of the clicked item.
Default Value: null

Show Example:
AngularJS
Knockout
jQuery
<div style="height:500px; max-width:750px; margin: 0 auto" dx-scroll-view="{ showScrollbar: 'always' }" ng-controller="demoController">
    <div class="wrapper">
        <p>Hold an item title</p>
        <div dx-accordion="{
            dataSource: accordionData,
            onItemTitleHold: titleHeld
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1>{{title}}</h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" ng-repeat="(key, value) in data">
                        <p>{{key}}: <b>{{value}}</b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.accordionData = new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    });
    $scope.titleHeld = function (e) {
        DevExpress.ui.notify("The \"" + e.itemData.title + "\" item title is held", "info", 2000);
    };
});

angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" data-bind="dxScrollView: { showScrollbar: 'always' }">
    <div class="wrapper">
        <p>Hold an item title</p>
        <div data-bind="dxAccordion:{
            dataSource: accordionData,
            onItemTitleHold: titleHeld
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1 data-bind="text: $data.title"></h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" data-bind="foreach: dataArray">
                        <p><span data-bind="text: propertyKey"></span>: <b data-bind="text: propertyValue"></b></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
var myViewModel = {
    accordionData: new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    }),
    titleHeld: function (e) {
        DevExpress.ui.notify("The \"" + e.itemData.title + "\" item title is held", "info", 2000);
    }
};
ko.applyBindings(myViewModel);
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
<div style="height:500px; max-width:750px; margin: 0 auto" id="demoBox">
    <div class="wrapper">
        <p>Hold an item title</p>
        <div id="myAccordion"></div>
    </div>
</div>
var accordionDataSource = new DevExpress.data.DataSource({
    store: [
        {
            title: "Personal Data",
            data: {
                firstName: "John",
                lastName: "Smith",
                birthYear: 1986,
            }
        },
        {
            title: "Contacts",
            data: {
                phone: "(555)555-5555",
                email: "John.Smith@example.com",
            }
        },
        {
            title: "Address",
            data: {
                state: "CA",
                city: "San Francisco",
                street: "Stanford Ave",
            }
        }
    ],
    map: function (itemData) {
        itemData.text = itemData.title;
        itemData.dataArray = $.map(itemData.data, function (value, key) {
            return {
                propertyKey: key,
                propertyValue: value
            }
        });
        return itemData;
    }
});
$("#myAccordion").dxAccordion({
    dataSource: accordionDataSource,
    onItemTitleHold: function (e) {
        DevExpress.ui.notify("The \"" + e.itemData.title + "\" item title is held", "info", 2000);
    },
    itemTitleTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.append("<h1>" + itemData.title + "</h1>");
    },
    itemTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.addClass("item-body");
        var wrapper = $("<div style='margin: 25px;'>");
        itemElement.append(wrapper);
        var innerWrapper = $("<div style='text-align:left;'>");
        wrapper.append(innerWrapper);
        for (var field in itemData.data)
            innerWrapper.append("<p>" + field + ": <b>" + itemData.data[field] + "</b></p>");
    }
});
$("#demoBox").dxScrollView({
    showScrollbar: 'always'
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}

onOptionChanged

A handler for the optionChanged event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
name: String
Specifies the name of the option whose value is changed.
fullName: String
Specifies a full name of the option whose value is changed. The full name is formed by concatenating the names of the options that are presented in the hierarchy of the given option. The names are delimited by commas.
value: any
Specifies a new value for the option.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element. Available only in the Knockout and AngularJS approaches.
Default Value: null

Assign a function to perform a custom action after an option of the component is changed.

onSelectionChanged

A handler for the selectionChanged event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element. Available only in the Knockout and AngularJS approaches.
addedItems: Array
An array of items added to selection.
removedItems: Array
An array of items removed from selection.
Default Value: null

Assign a function to perform a custom action after a collection item is selected or unselected.

Show Example:
AngularJS
Knockout
jQuery
<div style="height:500px; max-width:750px; margin: 0 auto" dx-scroll-view="{ showScrollbar: 'always' }" ng-controller="demoController">
    <div class="wrapper">
        <div dx-accordion="{
            dataSource: accordionData,
            collapsible: true,
            onSelectionChanged: selectionChanged
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1>{{title}}</h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" ng-repeat="(key, value) in data">
                        <p>{{key}}: <b>{{value}}</b></p>
                    </div>
                </div>
            </div>
        </div>
        <div dx-toast="{
            type: 'custom',
            displayTime: 2000,
            bindingOptions: {
                visible: 'toastVisible'
            }
        }">
            <p ng-style="{ 'display': expandedDisplayStyle }"><b style="color: #080">{{expandedItem}}</b> expanded<p>
            <p ng-style="{ 'display': collapsedDisplayStyle }"><b style="color: #F00">{{collapsedItem}}</b> collapsed<p>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.expandedDisplayStyle = "none",
    $scope.collapsedDisplayStyle = "none",
    $scope.expandedItem = "",
    $scope.collapsedItem = "",
    $scope.toastVisible = false,
    $scope.selectionChanged = function (e) {
        if (e.addedItems.length > 0) {
            $scope.expandedDisplayStyle = "inline";
            $scope.expandedItem = e.addedItems[0].title;
        }
        else
            $scope.expandedDisplayStyle = "none";
        if (e.removedItems.length > 0) {
            $scope.collapsedDisplayStyle = "inline";
            $scope.collapsedItem = e.removedItems[0].title;
        }
        else
            $scope.collapsedDisplayStyle = "none";
        $scope.toastVisible = true;
    },
    $scope.accordionData = new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
.dx-theme-generic .dx-toast-custom{
  background-color: #8AF;
}
<div style="height:500px; max-width:750px; margin: 0 auto" data-bind="dxScrollView: { showScrollbar: 'always' }">
    <div class="wrapper">
        <div data-bind="dxAccordion:{
            dataSource: accordionData,
            collapsible: true,
            onSelectionChanged: selectionChanged
        }">
            <div data-options="dxTemplate : { name: 'title' } ">
                <h1 data-bind="text: $data.title"></h1>
            </div>
            <div class="item-body" data-options="dxTemplate : { name: 'item' } ">
                <div style="margin:25px;">
                    <div style="text-align:left;" data-bind="foreach: dataArray">
                        <p><span data-bind="text: propertyKey"></span>: <b data-bind="text: propertyValue"></b></p>
                    </div>
                </div>
            </div>
        </div>
        <div data-bind="dxToast: {
            visible: toastVisible,
            type: 'custom',
            displayTime: 2000
        }">
            <p data-bind="style: { display: expandedDisplayStyle }"><b style="color: #080" data-bind="text: expandedItem"></b> expanded<p>
            <p data-bind="style: { display: collapsedDisplayStyle }"><b style="color: #F00" data-bind="text: collapsedItem"></b> collapsed<p>
        </div>
    </div>
</div>
var myViewModel = {
    expandedDisplayStyle: ko.observable("none"),
    collapsedDisplayStyle: ko.observable("none"),
    expandedItem: ko.observable(""),
    collapsedItem: ko.observable(""),
    toastVisible: ko.observable(false),
    selectionChanged: function (e) {
        if (e.addedItems.length > 0) {
            this.expandedDisplayStyle("inline");
            this.expandedItem(e.addedItems[0].title);
        }
        else
            this.expandedDisplayStyle("none");
        if (e.removedItems.length > 0) {
            this.collapsedDisplayStyle("inline");
            this.collapsedItem(e.removedItems[0].title);
        }
        else
            this.collapsedDisplayStyle("none");
        this.toastVisible(true);
    },
    accordionData: new DevExpress.data.DataSource({
        store: [
            {
                title: "Personal Data",
                data: {
                    firstName: "John",
                    lastName: "Smith",
                    birthYear: 1986,
                }
            },
            {
                title: "Contacts",
                data: {
                    phone: "(555)555-5555",
                    email: "John.Smith@example.com",
                }
            },
            {
                title: "Address",
                data: {
                    state: "CA",
                    city: "San Francisco",
                    street: "Stanford Ave",
                }
            }
        ],
        map: function (itemData) {
            itemData.text = itemData.title;
            itemData.dataArray = $.map(itemData.data, function (value, key) {
                return {
                    propertyKey: key,
                    propertyValue: value
                }
            });
            return itemData;
        }
    })
};
ko.applyBindings(myViewModel);
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
.dx-theme-generic .dx-toast-custom{
  background-color: #8AF;
}
<div style="height:500px; max-width:750px; margin: 0 auto" id="demoBox">
    <div class="wrapper">
        <div id="myAccordion"></div>
        <div id="toast">
            <p id="expanded"><b id="expandedTitle" style="color: #080"></b> expanded<p>
            <p id="collapsed"><b id="collapsedTitle" style="color: #F00"></b> collapsed<p>
        </div>
    </div>
</div>
var accordionDataSource = new DevExpress.data.DataSource({
    store: [
        {
            title: "Personal Data",
            data: {
                firstName: "John",
                lastName: "Smith",
                birthYear: 1986,
            }
        },
        {
            title: "Contacts",
            data: {
                phone: "(555)555-5555",
                email: "John.Smith@example.com",
            }
        },
        {
            title: "Address",
            data: {
                state: "CA",
                city: "San Francisco",
                street: "Stanford Ave",
            }
        }
    ],
    map: function (itemData) {
        itemData.text = itemData.title;
        itemData.dataArray = $.map(itemData.data, function (value, key) {
            return {
                propertyKey: key,
                propertyValue: value
            }
        });
        return itemData;
    }
});
$("#myAccordion").dxAccordion({
    dataSource: accordionDataSource,
    collapsible: true,
    onSelectionChanged: function (e) {
        $("#toast").dxToast("instance").show();
        if (e.addedItems.length > 0) {
            $("#expanded").css({ "display": "inline" });
            $("#expandedTitle").text(e.addedItems[0].title);
        }
        else {
            $("#expanded").css({ "display": "none" });
        }
        if (e.removedItems.length > 0) {
            $("#collapsed").css({ "display": "inline" });
            $("#collapsedTitle").text(e.removedItems[0].title);
        }
        else {
            $("#collapsed").css({ "display": "none" });
        }
    },
    itemTitleTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.append("<h1>" + itemData.title + "</h1>");
    },
    itemTemplate: function (itemData, itemIndex, itemElement) {
        itemElement.addClass("item-body");
        var wrapper = $("<div style='margin: 25px;'>");
        itemElement.append(wrapper);
        var innerWrapper = $("<div style='text-align:left;'>");
        wrapper.append(innerWrapper);
        for (var field in itemData.data)
            innerWrapper.append("<p>" + field + ": <b>" + itemData.data[field] + "</b></p>");
    }
});
$("#demoBox").dxScrollView({
    showScrollbar: 'always'
});
$("#toast").dxToast({
    type: 'custom',
    displayTime: 2000
});
.wrapper{
    padding: 20px;
}
.checkBox{
    margin: 10px;
}
.item-body{
    background-color:white;
    border: solid 1px gray;
}
.dx-theme-generic .dx-toast-custom{
  background-color: #8AF;
}

rtlEnabled

Specifies whether or not the current component supports a right-to-left representation.

Type: Boolean
Default Value: false

If you need to switch the display of this DevExtreme component to right-to-left, enable a specifically designed configuration option - rtlEnabled. When this option is set to true, the text flows from right to left, and the layout the component's elements is reversed. To switch the entire application/site to a right-to-left representation, use the static DevExpress.rtlEnabled field.

selectedIndex

The index number of the currently selected item.

Type: Number
Default Value: 0

selectedItem

The selected item object.

Type: Object
Default Value: null

selectedItems

An array of currently selected item objects.

Type: Array

tabIndex

Specifies the widget tab index.

Type: Number
Default Value: 0

visible

A Boolean value specifying whether or not the widget is visible.

Type: Boolean
Default Value: true

width

Specifies the width of the widget.

Type: Number|String|function
Return Value: Number|String
The widget width.
Default Value: undefined

The option can hold a value of the following types.

  • numeric
    The widget width in pixels.
  • string
    A CSS measurement of the widget width (e.g., "55px", "80%", "auto" and "inherit").
  • function
    The function returning the widget width. For example, see the following code.

    JavaScript
    width: function () { 
        return baseWidth - 10 + "%";
    }