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 UI 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. The component 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 a basic configuration of the ActionSheet component with multiple items.
@(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—You can configure the desired items and set various attributes like icons, text, descriptions, and more.
- Events—Handle the component events and implement the any custom functionality.
- Accessibility—The ActionSheet is accessible for screen readers, supports WAI-ARIA attributes, and delivers keyboard shortcuts for faster navigation.
Next Steps
- Getting Started with the ActionSheet
- Basic Usage of the ActionSheet HtmlHelper for ASP.NET MVC (Demo)