ActionSheet Configuration

An object defining configuration options for the ActionSheet widget.

cancelText

The text displayed in the button that closes the action sheet.

Type: String
Default Value: 'Cancel'

Show Example:
AngularJS
Knockout
jQuery
<div ng-controller="demoController">
    <div class="button" dx-button="{text:'Show action sheet', onClick: showActionSheet}"></div>
    <div dx-action-sheet="{ 
        dataSource: actionSheetData,
        title: 'Choose action',
        showTitle: true,
        bindingOptions: {
            visible: 'actionSheetVisible',
            cancelText: 'actionSheetCancelText'
        }
    }"></div>
    <div class="dx-fieldset">
        <div class="dx-field">
            <div class="dx-field-label">Cancel text</div>
            <div class="dx-field-value" ng-model="actionSheetCancelText" dx-text-box="{ }"></div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.actionSheetVisible = false;
    $scope.actionSheetCancelText = "Cancel";
    $scope.actionSheetData = [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ];
    $scope.showActionSheet = function () {
        $scope.actionSheetVisible = true;
    };
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align:center;
}
.button{
    margin-top:25px;
}
<div class="button" data-bind="dxButton:{ text:'Show action sheet', onClick: showActionSheet }"></div>
<div data-bind="dxActionSheet: { 
    dataSource: actionSheetData,
    visible: actionSheetVisible,
    title: 'Choose action',
    showTitle: true,
    cancelText: actionSheetCancelText
}"></div>
<div class="dx-fieldset">
  <div class="dx-field">
    <div class="dx-field-label">Cancel text</div>
    <div class="dx-field-value" data-bind="dxTextBox: { value: actionSheetCancelText }"></div>
  </div>
</div>
var myViewModel = {
    actionSheetVisible: ko.observable(false),
    actionSheetCancelText: ko.observable("Cancel"),
    actionSheetData: [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ],
    showActionSheet: function () {
        this.actionSheetVisible(true);
    }
}
ko.applyBindings(myViewModel);
body{
    text-align:center;
}
.button{
    margin-top:25px;
}
<div class="button" id="showButton"></div>
<div id="myActionSheet"></div>
<div class="dx-fieldset">
  <div class="dx-field">
    <div class="dx-field-label">Cancel text</div>
    <div class="dx-field-value" id="cancelTextBox"></div>
  </div>
</div>
$("#showButton").dxButton({
    text: 'Show action sheet',
    onClick: function () {
        $("#myActionSheet").dxActionSheet("instance").show();
    }
});
$("#myActionSheet").dxActionSheet({
    dataSource: [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ],
    cancelText: 'Cancel',
    title: 'Choose action',
    showTitle: true
});
$("#cancelTextBox").dxTextBox({
    value: 'Cancel',
    onValueChanged: function (e) {
        $("#myActionSheet").dxActionSheet("instance").option("cancelText", e.value);
    }
});
body{
    text-align:center;
}
.button{
    margin-top:25px;
}

dataSource

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

Default Value: null

This option accepts one of the following.

  • Array of objects A simple JavaScript array containing a collection of plain objects.

  • URL A URL to JSON data or to a service returning data in JSON format

  • DataSource or its configuration object A DataSource is an object that provides a handy API for data processing. A DataSource is a stateful object, which means that it saves data processing settings and applies them each time data is loaded. All underlying data access logic of a DataSource is isolated in a Store. A Store provides an API for reading and modifying data. Unlike the DataSource, a Store is a stateless object.

NOTE: If the data source is specified using the dataSource option, use the items option only for reading. Updating data items using the items option may cause unexpected results.

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. For details, refer to the Customize Widget Element Appearance topic.

Show Example:
AngularJS
Knockout
jQuery
<div ng-controller="demoController">
    <div class="button" dx-button="{text:'Show action sheet', onClick: showActionSheet}"></div>
    <div dx-action-sheet="{ 
        dataSource: actionSheetData,
        title: 'Choose action',
        showTitle: true,
        bindingOptions: {
            visible: 'actionSheetVisible'
        }
    }"></div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    var processClick = function (name) {
        DevExpress.ui.notify(name + " clicked", "success", 3000);
    };
    $scope.actionSheetVisible = false;
    $scope.actionSheetData = [
        { text: "Reply", onClick: function () { processClick("Reply") } },
        { text: "ReplyAll", onClick: function () { processClick("ReplyAll") } },
        { text: "Forward", onClick: function () { processClick("Forward") } },
        { text: "Delete", onClick: function () { processClick("Delete") } }
    ];
    $scope.showActionSheet = function () {
        $scope.actionSheetVisible = true;
    };
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align:center;
}
.button{
    margin-top:25px;
}
<div class="button" data-bind="dxButton:{ text:'Show action sheet', onClick: showActionSheet }"></div>
<div data-bind="dxActionSheet: { 
    dataSource: actionSheetData,
    visible: actionSheetVisible,
    title: 'Choose action',
    showTitle: true
}"></div>
var processClick = function (name) {
    DevExpress.ui.notify(name + " clicked", "success", 3000);
};
var myViewModel = {
    actionSheetVisible: ko.observable(false),
    actionSheetData: [
        { text: "Reply", onClick: function () { processClick("Reply") } },
        { text: "ReplyAll", onClick: function () { processClick("ReplyAll") } },
        { text: "Forward", onClick: function () { processClick("Forward") } },
        { text: "Delete", onClick: function () { processClick("Delete") } }
    ],
    showActionSheet: function () {
        this.actionSheetVisible(true);
    }
}
ko.applyBindings(myViewModel);
body{
    text-align:center;
}
.button{
    margin-top:25px;
}
<div class="button" id="showButton"></div>
<div id="myActionSheet"></div>
$("#showButton").dxButton({
    text: 'Show action sheet',
    onClick: function () {
        $("#myActionSheet").dxActionSheet("instance").show();
    }
});
$("#myActionSheet").dxActionSheet({
    dataSource: [
        { text: "Reply", onClick: function () { processClick("Reply") } },
        { text: "ReplyAll", onClick: function () { processClick("ReplyAll") } },
        { text: "Forward", onClick: function () { processClick("Forward") } },
        { text: "Delete", onClick: function () { processClick("Delete") } }
    ],
    title: 'Choose action',
    showTitle: true
});
var processClick = function (name) {
    DevExpress.ui.notify(name + " clicked", "success", 3000);
};
body{
    text-align:center;
}
.button{
    margin-top:25px;
}

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 ng-controller="demoController">
    <div class="button" dx-button="{text:'Show action sheet', onClick: showActionSheet}"></div>
    <div dx-action-sheet="{ 
        dataSource: actionSheetData,
        title: 'Choose action',
        showTitle: true,
        bindingOptions: {
            visible: 'actionSheetVisible',
            disabled: 'actionSheetDisabled'
        }
    }"></div>
    <div class="dx-fieldset">
        <div class="dx-field">
            <div class="dx-field-label">Disabled</div>
            <div class="dx-field-value" ng-model="actionSheetDisabled" dx-switch="{ }"></div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.actionSheetVisible = false;
    $scope.actionSheetDisabled = false;
    $scope.actionSheetData = [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ];
    $scope.showActionSheet = function () {
        $scope.actionSheetVisible = true;
    };
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align:center;
}
.button{
    margin-top:25px;
}
<div class="button" data-bind="dxButton:{ text:'Show action sheet', onClick: showActionSheet }"></div>
<div data-bind="dxActionSheet: { 
    dataSource: actionSheetData,
    visible: actionSheetVisible,
    disabled: actionSheetDisabled,
    title: 'Choose action',
    showTitle: true
}"></div>
<div class="dx-fieldset">
  <div class="dx-field">
    <div class="dx-field-label">Disabled</div>
    <div class="dx-field-value" data-bind="dxSwitch: { value: actionSheetDisabled }"></div>
  </div>
</div>
var myViewModel = {
    actionSheetVisible: ko.observable(false),
    actionSheetDisabled: ko.observable(false),
    actionSheetData: [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete"}
    ],
    showActionSheet: function () {
        this.actionSheetVisible(true);
    }
}
ko.applyBindings(myViewModel);
body{
    text-align:center;
}
.button{
    margin-top:25px;
}
<div class="button" id="showButton"></div>
<div id="myActionSheet"></div>
<div class="dx-fieldset">
  <div class="dx-field">
    <div class="dx-field-label">Disabled</div>
    <div class="dx-field-value" id="disabledSelector"></div>
  </div>
</div>
$("#showButton").dxButton({
    text: 'Show action sheet',
    onClick: function () {
        $("#myActionSheet").dxActionSheet("instance").show();
    }
});
$("#myActionSheet").dxActionSheet({
    dataSource: [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ],
    title: 'Choose action',
    showTitle: true
});
$("#disabledSelector").dxSwitch({
    value: false,
    onValueChanged: function (e) {
        $("#myActionSheet").dxActionSheet("instance").option("disabled", e.value);
    }
});
body{
    text-align:center;
}
.button{
    margin-top:25px;
}

height

Specifies the height of the widget.

Type: Number|String| function
Return Value: Number|String
The widget height.
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.,

    JavaScript
    height: function () {
        return baseHeight - 10 + "%";
    });

hint

Specifies the text of the hint displayed for the widget.

Type: String
Default Value: undefined

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.

NOTE: If you need to modify the data source specified using the items option at runtime, do it only with the help of the items option. Updating data items using the dataSource option may cause unexpected results.

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. For details, refer to the Customize Widget Element Appearance topic.

See Also

itemTemplate

The template to be used for rendering items.

Type: template
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: 'item'

A binding context of an item template is the data source object that corresponds to the currently rendered item.

In Knockout approach, you can bind template elements to the item object's fields directly. To access another binding context within an item template, use Knockout binding variables.

In AngularJS Approach, if you need to access item object's fields within a template, use a variable whose name is assigned to the dx-item-alias directive. Add the directive to the widget element to specify an alias to the root object of an item. Without this directive, item object fields are beyond reach. To access another binding context within an item template, use AngularJS binding variables.

See Also
Show Example:
AngularJS
Knockout
jQuery
<div ng-controller="demoController">
    <p>Use the following item template</p>
    <div class="box" ng-model="currentItemTemplate" dx-select-box="{
        dataSource: itemTemplates
    }"></div>
    <div class="button" dx-button="{ text:'Show action sheet', onClick: showActionSheet }"></div>
    <div dx-action-sheet="{
        dataSource: actionSheetData,
        title: 'Choose action',
        showTitle: true,
        onItemClick: itemClicked,
        bindingOptions: {
            itemTemplate: 'currentItemTemplate',
            visible: 'actionSheetVisible'
        }
    }" dx-item-alias="itemObj">
        <div data-options="dxTemplate: { name: 'links' }">
            <div class="actionSheetButton">
                <a href="#">{{itemObj.text}}</a>
            </div>
        </div>
        <div data-options="dxTemplate: { name: 'buttons' }" dx-button="{ text: itemObj.text, icon: itemObj.icon }">
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.actionSheetVisible = false;
    $scope.itemTemplates = ['buttons', 'links'],
    $scope.currentItemTemplate = 'buttons',
    $scope.actionSheetData = [
        { text: "Reply", icon: 'arrowleft' },
        { text: "ReplyAll", icon: 'arrowleft' },
        { text: "Forward", icon: 'arrowright' },
        { text: "Delete", icon: 'close' }
    ],
    $scope.showActionSheet = function () {
        $scope.actionSheetVisible = true;
    };
    $scope.itemClicked = function (e) {
        DevExpress.ui.notify(e.itemData.text + " clicked", "success", 3000);
    };
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align:center;
}
p{
    margin: 10px;
}
.button{
    margin-top:25px;
}
.box{
    margin: 10px;
}
.actionSheetButton {
    margin: 5px auto;
    background-color: white;
    color: blue;
    padding: 10px;
    border: 1px dotted #080;
}
.actionSheetButton a{
    color: #080;
    text-decoration: none;
}
<p>Use the following item template</p>
<div class="box" data-bind="dxSelectBox: {
    dataSource: itemTemplates,
    value: currentItemTemplate
}"></div>
<div class="button" data-bind="dxButton:{ text:'Show action sheet', onClick: showActionSheet }"></div>
<div data-bind="dxActionSheet: { 
    dataSource: actionSheetData,
    visible: actionSheetVisible,
    title: 'Choose action',
    showTitle: true,
    itemTemplate: currentItemTemplate,
    onItemClick: itemClicked
}">
    <div data-options="dxTemplate: { name: 'links' }">
        <div class="actionSheetButton">
            <a href="#" data-bind="text: text"></a>
        </div>
    </div>
    <div data-options="dxTemplate: { name: 'buttons' }" data-bind="dxButton: { text: text, icon: icon }">
    </div>
</div>
var myViewModel = {
    actionSheetVisible: ko.observable(false),
    itemTemplates: ['buttons', 'links'],
    currentItemTemplate: ko.observable('buttons'),
    actionSheetData: [
        { text: "Reply", icon: 'arrowleft' },
        { text: "ReplyAll", icon: 'arrowleft' },
        { text: "Forward", icon: 'arrowright' },
        { text: "Delete", icon: 'close' }
    ],
    showActionSheet: function () {
        this.actionSheetVisible(true);
    },
    itemClicked: function (e) {
        DevExpress.ui.notify(e.itemData.text + " clicked", "success", 3000);
    }
}
ko.applyBindings(myViewModel);
body{
    text-align:center;
}
p{
    margin: 10px;
}
.button{
    margin-top:25px;
}
.box{
    margin: 10px;
}
.actionSheetButton {
    margin: 5px auto;
    background-color: white;
    color: blue;
    padding: 10px;
    border: 1px dotted #080;
}
.actionSheetButton a{
    color: #080;
    text-decoration: none;
}
<p>Use the following item template</p>
<div class="box" id="templateSelector"></div>
<div class="button" id="showButton"></div>
<div id="myActionSheet"></div>
var linksTemplate = function (itemData, itemIndex, itemElement) {
    var linkContainer = $("<div class=\"actionSheetButton\">");
    linkContainer.append("<a href=\"#\">" + itemData.text + "</a>");
    itemElement.append(linkContainer);
};
var buttonsTemplate = function (itemData, itemIndex, itemElement) {
    itemElement.dxButton({
        text: itemData.text,
        icon: itemData.icon
    });
};
$("#showButton").dxButton({
    text: 'Show action sheet',
    onClick: function () {
        $("#myActionSheet").dxActionSheet("instance").show();
    }
});
$("#templateSelector").dxSelectBox({
    dataSource: ['buttons', 'links'],
    value: 'buttons',
    onValueChanged: function (e) {
        var actionSheet = $("#myActionSheet").dxActionSheet("instance");
        actionSheet.option("itemTemplate", e.value === 'buttons' ? buttonsTemplate : linksTemplate );
    }
});
$("#myActionSheet").dxActionSheet({
    dataSource: [
        { text: "Reply", icon: 'arrowleft' },
        { text: "ReplyAll", icon: 'arrowleft' },
        { text: "Forward", icon: 'arrowright' },
        { text: "Delete", icon: 'close' }
    ],
    title: 'Choose action',
    showTitle: true,
    itemTemplate: buttonsTemplate,
    onItemClick: function (e) {
            DevExpress.ui.notify(e.itemData.text + " clicked", "success", 3000);
    }
});
body{
    text-align:center;
}
p{
    margin: 10px;
}
.button{
    margin-top:25px;
}
.box{
    margin: 10px;
}
.actionSheetButton {
    margin: 5px auto;
    background-color: white;
    color: blue;
    padding: 10px;
    border: 1px dotted #080;
}
.actionSheetButton a{
    color: #080;
    text-decoration: none;
}

onCancelClick

A handler for the cancelClick event.

Type: function |String
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
Indicates whether or not to cancel hiding the action sheet menu when clicking the Cancel button.
model: Object
Provides access to the data that is available for binding against the element. Available only in the Knockout approach.
cancel: Boolean
Specifies whether or not to cancel hiding the action sheet.
Default Value: null

Assign a function to perform a custom action when clicking the Cancel button. Use the cancel field of the object passed as a function parameter. Set this field to true to prohibit the hiding of the action sheet menu when an end user clicks the Cancel button on it.

To navigate to a specific URL when the cancelClick 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 ng-controller="demoController">
    <div class="button" dx-button="{text:'Show action sheet', onClick: showActionSheet}"></div>
    <div dx-action-sheet="{ 
        dataSource: actionSheetData,
        title: 'Choose action',
        showTitle: true,
        onCancelClick: cancelButtonClicked,
        bindingOptions: {
            visible: 'actionSheetVisible'
        }
    }"></div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.actionSheetVisible = false;
    $scope.actionSheetData = [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ];
    $scope.showActionSheet = function () {
        $scope.actionSheetVisible = true;
    };
    $scope.cancelButtonClicked = function () {
        DevExpress.ui.notify("Cancel button has been clicked.", "info", 1000);
    }
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align:center;
}
.button{
    margin-top:25px;
}
<div class="button" data-bind="dxButton:{ text:'Show action sheet', onClick: showActionSheet }"></div>
<div data-bind="dxActionSheet: { 
    dataSource: actionSheetData,
    visible: actionSheetVisible,
    title: 'Choose action',
    showTitle: true,
    onCancelClick: cancelButtonClicked
}"></div>
var myViewModel = {
    actionSheetVisible: ko.observable(false),
    actionSheetData: [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ],
    showActionSheet: function () {
        this.actionSheetVisible(true);
    },
    cancelButtonClicked: function () {
        DevExpress.ui.notify("Cancel button has been clicked.", "info", 1000);
    }
}
ko.applyBindings(myViewModel);
body{
    text-align:center;
}
.button{
    margin-top:25px;
}
<div class="button" id="showButton"></div>
<div id="myActionSheet"></div>
$("#showButton").dxButton({
    text: 'Show action sheet',
    onClick: function () {
        $("#myActionSheet").dxActionSheet("instance").show();
    }
});
$("#myActionSheet").dxActionSheet({
    dataSource: [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ],
    title: 'Choose action',
    showTitle: true,
    onCancelClick: function () {
        DevExpress.ui.notify("Cancel button has been clicked.", "info", 1000);
    }
});
body{
    text-align:center;
}
.button{
    margin-top:25px;
}

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 approach.
Default Value: null

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

Show Example:
jQuery
<div class="button" data-bind="dxButton: { text: 'Show action sheet', onClick: showActionSheet }"></div>
<div id="actionSheetContainer" data-bind="dxActionSheet: {
  dataSource: actionSheetData,
  visible: actionSheetVisible,
  onContentReady: processContentReady
}"></div>
actionSheetVisible = ko.observable(false);
actionSheetData = [
    { text: "Reply" },
    { text: "ReplyAll" },
    { text: "Forward" },
    { text: "Delete" }
];
showActionSheet = function () {
  actionSheetVisible(true);
};
processContentReady = function () {
  DevExpress.ui.dialog.alert("The widget content is ready", "Action executed");
};
body{
  text-align: center;
}
.button{
  margin: 10px;
}

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 approach.
Default Value: null

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

NOTE: The function assigned to this option is executed only if the widget is removed using the remove(), empty(), or html() jQuery methods.

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 approach.
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 ng-controller="demoController">
    <div class="button" dx-button="{text:'Show action sheet', onClick: showActionSheet}"></div>
    <div dx-action-sheet="{ 
        dataSource: actionSheetData,
        title: 'Choose action',
        showTitle: true,
        onItemClick: itemClicked,
        bindingOptions: {
            visible: 'actionSheetVisible'
        }
    }"></div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.actionSheetVisible = false;
    $scope.actionSheetData = [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ];
    $scope.showActionSheet = function () {
        $scope.actionSheetVisible = true;
    };
    $scope.itemClicked = function (e) {
        DevExpress.ui.dialog.alert("\"" + e.itemData.text + "\" has been clicked", "Action executed");
    }
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align:center;
}
.button{
    margin-top:25px;
}
<div class="button" data-bind="dxButton:{ text:'Show action sheet', onClick: showActionSheet }"></div>
<div data-bind="dxActionSheet: { 
    dataSource: actionSheetData,
    visible: actionSheetVisible,
    title: 'Choose action',
    showTitle: true,
    onItemClick: itemClicked
}"></div>
var myViewModel = {
    actionSheetVisible: ko.observable(false),
    actionSheetData: [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ],
    showActionSheet: function () {
        this.actionSheetVisible(true);
    },
    itemClicked: function (e) {
        DevExpress.ui.dialog.alert("\"" + e.itemData.text + "\" has been clicked", "Action executed");
    }
}
ko.applyBindings(myViewModel);
body{
    text-align:center;
}
.button{
    margin-top:25px;
}
<div class="button" id="showButton"></div>
<div id="myActionSheet"></div>
$("#showButton").dxButton({
    text: 'Show action sheet',
    onClick: function () {
        $("#myActionSheet").dxActionSheet("instance").show();
    }
});
$("#myActionSheet").dxActionSheet({
    dataSource: [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ],
    title: 'Choose action',
    showTitle: true,
    onItemClick: function (e) {
        DevExpress.ui.dialog.alert("\"" + e.itemData.text + "\" has been clicked", "Action executed");
    }
});
body{
    text-align:center;
}
.button{
    margin-top:25px;
}

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 approach.
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.

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 approach.
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).

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 approach.
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.

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 approach.
Default Value: null

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

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.

showCancelButton

Specifies whether or not to display the Cancel button in action sheet.

Type: Boolean
Default Value: true

The Cancel button closes the action sheet.

NOTE: The showCancelButton option makes sense only if the usePopover option is disabled. Otherwise, the Cancel button is hidden. In this case, the popover is closed by an outside click.

Show Example:
AngularJS
Knockout
jQuery
<div ng-controller="demoController">
    <div class="button" dx-button="{text:'Show action sheet', onClick: showActionSheet}"></div>
    <div dx-action-sheet="{ 
        dataSource: actionSheetData,
        title: 'Choose action',
        showTitle: true,
        bindingOptions: {
            visible: 'actionSheetVisible',
            showCancelButton: 'showCancelButtonValue'
        }
    }"></div>
    <div class="dx-fieldset">
        <div class="dx-field">
            <div class="dx-field-label">showCancelButton</div>
            <div class="dx-field-value" ng-model="showCancelButtonValue" dx-switch="{ }"></div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.actionSheetVisible = false;
    $scope.showCancelButtonValue = true;
    $scope.actionSheetData = [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ];
    $scope.showActionSheet = function () {
        $scope.actionSheetVisible = true;
    };
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align:center;
}
.button{
    margin-top:25px;
}
.dx-field-label {
    width: 50%;
}
<div class="button" data-bind="dxButton:{ text:'Show action sheet', onClick: showActionSheet }"></div>
<div data-bind="dxActionSheet: { 
    dataSource: actionSheetData,
    visible: actionSheetVisible,
    showCancelButton: showCancelButtonValue,
    title: 'Choose action',
    showTitle: true
}"></div>
<div class="dx-fieldset">
  <div class="dx-field">
    <div class="dx-field-label">showCancelButton</div>
    <div class="dx-field-value" data-bind="dxSwitch: { value: showCancelButtonValue }"></div>
  </div>
</div>
var myViewModel = {
    actionSheetVisible: ko.observable(false),
    showCancelButtonValue: ko.observable(true),
    actionSheetData: [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ],
    showActionSheet: function () {
        this.actionSheetVisible(true);
    }
}
ko.applyBindings(myViewModel);
body{
    text-align:center;
}
.button{
    margin-top:25px;
}
.dx-field-label {
    width: 50%;
}
<div class="button" id="showButton"></div>
<div id="myActionSheet"></div>
<div class="dx-fieldset">
  <div class="dx-field">
    <div class="dx-field-label">showCancelButton</div>
    <div class="dx-field-value" id="showCancelButtonSelector"></div>
  </div>
</div>
$("#showButton").dxButton({
    text: 'Show action sheet',
    onClick: function () {
        $("#myActionSheet").dxActionSheet("instance").show();
    }
});
$("#myActionSheet").dxActionSheet({
    dataSource: [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ],
    title: 'Choose action',
    showTitle: true
});
$("#showCancelButtonSelector").dxSwitch({
    value: true,
    onValueChanged: function (e) {
        $("#myActionSheet").dxActionSheet("instance").option("showCancelButton", e.value);
    }
});
body{
    text-align:center;
}
.button{
    margin-top:25px;
}
.dx-field-label {
    width: 50%;
}

showTitle

A Boolean value specifying whether or not the title of the action sheet is visible.

Type: Boolean
Default Value: true

Show Example:
AngularJS
Knockout
jQuery
<div ng-controller="demoController">
    <div class="button" dx-button="{text:'Show action sheet', onClick: showActionSheet}"></div>
    <div dx-action-sheet="{ 
        dataSource: actionSheetData,
        title: 'Choose action',
        bindingOptions: {
            visible: 'actionSheetVisible',
            showTitle: 'showTitleValue'
        }
    }"></div>
    <div class="dx-fieldset">
        <div class="dx-field">
            <div class="dx-field-label">showTitle</div>
            <div class="dx-field-value" ng-model="showTitleValue" dx-switch="{ }"></div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.actionSheetVisible = false;
    $scope.showTitleValue = true;
    $scope.actionSheetData = [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ];
    $scope.showActionSheet = function () {
        $scope.actionSheetVisible = true;
    };
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align:center;
}
.button{
    margin-top:25px;
}
<div class="button" data-bind="dxButton:{ text:'Show action sheet', onClick: showActionSheet }"></div>
<div data-bind="dxActionSheet: { 
    dataSource: actionSheetData,
    visible: actionSheetVisible,
    showTitle: showTitleValue,
    title: 'Choose action'
}"></div>
<div class="dx-fieldset">
  <div class="dx-field">
    <div class="dx-field-label">showTitle</div>
    <div class="dx-field-value" data-bind="dxSwitch: { value: showTitleValue }"></div>
  </div>
</div>
var myViewModel = {
    actionSheetVisible: ko.observable(false),
    showTitleValue: ko.observable(true),
    actionSheetData: [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ],
    showActionSheet: function () {
        this.actionSheetVisible(true);
    }
}
ko.applyBindings(myViewModel);
body{
    text-align:center;
}
.button{
    margin-top:25px;
}
<div class="button" id="showButton"></div>
<div id="myActionSheet"></div>
<div class="dx-fieldset">
  <div class="dx-field">
    <div class="dx-field-label">showTitle</div>
    <div class="dx-field-value" id="showTitleSelector"></div>
  </div>
</div>
$("#showButton").dxButton({
    text: 'Show action sheet',
    onClick: function () {
        $("#myActionSheet").dxActionSheet("instance").show();
    }
});
$("#myActionSheet").dxActionSheet({
    dataSource: [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ],
    title: 'Choose action',
    showTitle: true
});
$("#showTitleSelector").dxSwitch({
    value: true,
    onValueChanged: function (e) {
        $("#myActionSheet").dxActionSheet("instance").option("showTitle", e.value);
    }
});
body{
    text-align:center;
}
.button{
    margin-top:25px;
}

target

Specifies the element the action sheet popover points at.

This options should be utilizes only if the usePopover option is set to true.

Show Example:
AngularJS
Knockout
jQuery
<div ng-controller="demoController">
    <div id="showButton" dx-button="{text:'Show action sheet', onClick: showActionSheet}"></div>
    <div dx-action-sheet="{ 
        dataSource: actionSheetData,
        usePopover: true,
        showTitle: false,
        target: '#showButton',
        bindingOptions: {
            visible: 'actionSheetVisible'
        }
    }"></div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.actionSheetVisible = false;
    $scope.actionSheetData = [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ];
    $scope.showActionSheet = function () {
        $scope.actionSheetVisible = true;
    };
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align:center;
}
#showButton{
    margin-top:25px;
}
<div id="showButton" data-bind="dxButton:{ text:'Show action sheet', onClick: showActionSheet }"></div>
<div data-bind="dxActionSheet: { 
    dataSource: actionSheetData,
    visible: actionSheetVisible,
    showTitle: false,
    usePopover: true,
    target: '#showButton'
}"></div>
var myViewModel = {
    actionSheetVisible: ko.observable(false),
    actionSheetData: [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ],
    showActionSheet: function () {
        this.actionSheetVisible(true);
    }
}
ko.applyBindings(myViewModel);
body{
    text-align:center;
}
#showButton{
    margin-top:25px;
}
<div id="showButton"></div>
<div id="myActionSheet"></div>
$("#showButton").dxButton({
    text: 'Show action sheet',
    onClick: function () {
        $("#myActionSheet").dxActionSheet("instance").show();
    }
});
$("#myActionSheet").dxActionSheet({
    dataSource: [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ],
    showTitle: false,
    usePopover: true,
    target: '#showButton'
});
body{
    text-align:center;
}
#showButton{
    margin-top:25px;
}

title

The title of the action sheet.

Type: String
Default Value: ''

usePopover

Specifies whether or not to show the action sheet within a Popover widget.

Type: Boolean
Default Value: false
Default for tablet ios: true

To display the action sheet as a popover specify an element the popover points at via the target option.

Show Example:
AngularJS
Knockout
jQuery
<div ng-controller="demoController">
    <div id="showButton" dx-button="{text:'Show action sheet', onClick: showActionSheet}"></div>
    <div dx-action-sheet="{ 
        dataSource: actionSheetData,
        target: '#showButton',
        showTitle: false,
        bindingOptions: {
            visible: 'actionSheetVisible',
            usePopover: 'displayAsPopover'
        }
    }"></div>
    <div class="dx-fieldset">
        <div class="dx-field">
            <div class="dx-field-label">usePopover</div>
            <div class="dx-field-value" ng-model="displayAsPopover" dx-switch="{ }"></div>
        </div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.actionSheetVisible = false;
    $scope.displayAsPopover = true;
    $scope.actionSheetData = [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ];
    $scope.showActionSheet = function () {
        $scope.actionSheetVisible = true;
    };
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align:center;
}
#showButton{
    margin-top:25px;
}
<div id="showButton" data-bind="dxButton:{ text:'Show action sheet', onClick: showActionSheet }"></div>
<div data-bind="dxActionSheet: { 
    dataSource: actionSheetData,
    visible: actionSheetVisible,
    showTitle: false,
    usePopover: displayAsPopover,
    target: '#showButton'
}"></div>
<div class="dx-fieldset">
  <div class="dx-field">
    <div class="dx-field-label">usePopover</div>
    <div class="dx-field-value" data-bind="dxSwitch: { value: displayAsPopover }"></div>
  </div>
</div>
var myViewModel = {
    actionSheetVisible: ko.observable(false),
    displayAsPopover: ko.observable(true),
    actionSheetData: [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ],
    showActionSheet: function () {
        this.actionSheetVisible(true);
    }
}
ko.applyBindings(myViewModel);
body{
    text-align:center;
}
#showButton{
    margin-top:25px;
}
<div id="showButton"></div>
<div id="myActionSheet"></div>
<div class="dx-fieldset">
  <div class="dx-field">
    <div class="dx-field-label">usePopover</div>
    <div class="dx-field-value" id="usePopoverSelector"></div>
  </div>
</div>
$("#showButton").dxButton({
    text: 'Show action sheet',
    onClick: function () {
        $("#myActionSheet").dxActionSheet("instance").show();
    }
});
$("#myActionSheet").dxActionSheet({
    dataSource: [
        { text: "Reply" },
        { text: "ReplyAll" },
        { text: "Forward" },
        { text: "Delete" }
    ],
    showTitle: false,
    target: "#showButton"
});
$("#usePopoverSelector").dxSwitch({
    value: false,
    onValueChanged: function (e) {
        $("#myActionSheet").dxActionSheet("instance").option("usePopover", e.value);
    }
});
body{
    text-align:center;
}
#showButton{
    margin-top:25px;
}

visible

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

Type: Boolean
Default Value: false

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 + "%";
    }