Events
The Telerik UI TileLayout for ASP.NET MVC exposes a number of events that allow you to control the behavior of the UI component.
For a complete example on basic TileLayout events, refer to the demo on using the events of the TileLayout.
Handling by Handler Name
The following example demonstrates how to subscribe to events by a handler name.
@(Html.Kendo().TileLayout()
.Name("tilelayout")
.Events(e => e.Reorder("onReorder"))
... //Additional configuration
)
<script>
function onReorder(e){
// Handle the TileLayout Reorder event that triggers when a tile is reordered.
};
</script>
Handling by Template Delegate
The following example demonstrates how to subscribe to events by a template delegate.
@(Html.Kendo().TileLayout()
.Name("tilelayout")
.Events(e => e.Reorder(@<text>
function() {
// Handle the TileLayout Reorder event inline.
}
</text>)
)
... //Additional configuration
)