ASP.NET MVC ActionSheet Overview
The ActionSheet is part of Telerik UI for ASP.NET MVC, a
professional grade UI library with 110+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.
The Telerik ActionSheet HtmlHelper for ASP.NET MVC is a server-side wrapper for the Kendo UI ActionSheet widget.
The ActionSheet is a dialog that displays a set of options for the user to choose from. It appears on top of the app's content, and the user must manually dismiss it before resuming the interaction with the app.
Initializing the ActionSheet
The following example demonstrates how to define the ActionSheet.
@(Html.Kendo().ActionSheet()
.Name("actionsheet")
)
Basic Configuration
The following example demonstrates the basic configuration for the ActionSheet HtmlHelper.
@(Html.Kendo().ActionSheet()
.Name("actionsheet")
.Title("Select item")
.Items(items =>
{
items.Add().Text("Edit Item").IconClass("k-icon k-i-edit").Click("onClick");
items.Add().Text("Add to Favorites").IconClass("k-icon k-i-heart").Click("onClick");
items.Add().Text("Upload New").IconClass("k-icon k-i-upload").Click("onClick");
items.Add().Text("Cancel").IconClass("k-icon k-i-cancel").Group("bottom").Click("onClick");
})
)
<script>
$(function() {
// The Name() of the ActionSheet is used to get its client-side instance.
function onClick(e) {
e.preventDefault();
var actionsheet = $("#actionsheet").data("kendoActionSheet");
actionsheet.close();
}
});
</script>
Functionality and Features
- Items - the configuration allows you to set various attributes like icons and text.
- Events - the events that provide easy configuration or extension points for custom functionality
- Accessibility - the ActionSheet supports various accessibility standards.