Events
The Telerik UI DockManager for ASP.NET MVC exposes multiple events that allow you to control and customize the behavior of the UI component.
For a complete example on basic DockManager events, refer to the demo on using the events of the DockManager.
Handling by Handler Name
The following example demonstrates how to subscribe to events by handler name.
@(Html.Kendo().DockManager()
.Name("dockmanager")
.Events(events => events.Pin("onPin"))
.RootPane(root =>
{
root.Id("root")
.Panes(panes => {
panes.Add().Type(PaneType.Split).Panes(top => {
top.Add().Id("tools")
.Type(PaneType.Content)
.Title("Tools")
.Content("Content");
});
});
})
)
<script>
function onPin(e){
// Handle the pin event.
}
</script>
Handling by Template Delegate
The following example demonstrates how to subscribe to events by using a template delegate.
@(Html.Kendo().DockManager()
.Name("dockmanager")
.Events(events => events.Pin(@<text>
function(e){
// Handle the Pin event.
}
</text>)
)
.RootPane(root =>
{
root.Id("root")
.Panes(panes => {
panes.Add().Type(PaneType.Split).Panes(top => {
top.Add().Id("tools")
.Type(PaneType.Content)
.Title("Tools")
.Content("Content");
});
});
})
)