Custom Actions
You can create custom actions for the Window via the Actions.Custom()
configuration option.
The Window then renders k-icon
and k-i-actionname
CSS classes for the action but does not automatically attach a click
event handler to it. While the Kendo UI stylesheets provide a "custom"
icon for custom actions, you can use an icon name of your choice. To capture and handle the click
events, follow the standard approach:
@(Html.Kendo().Window()
.Name("window")
.Title("Window")
.Actions(actions => actions
.Custom("custom")
.Minimize()
.Maximize()
.Close()
)
.Content("Window Content")
)
<script>
$(document).ready(function() {
$("#window").data("kendoWindow").wrapper
.find(".k-i-custom").parent().click(function (e) {
alert("Custom action button clicked");
e.preventDefault();
});
});
</script>