# Events

The Telerik UI TileLayout for ASP.NET Core [exposes a number of events](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/tilelayouteventbuilder) 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](https://demos.telerik.com/aspnet-core/tilelayout/events).

## Handling by Handler Name

The following example demonstrates how to subscribe to events by a handler name.

```Razor HtmlHelper
    @(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>
```

```Razor TagHelper
    <kendo-tilelayout name="tilelayout" reorderable="true" on-reorder="onReorder">
        
    </kendo-tilelayout>

    <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.

```Razor HtmlHelper
    @(Html.Kendo().TileLayout()
        .Name("tilelayout")
        .Events(e => e.Reorder(@<text>
                function() {
                    // Handle the TileLayout Reorder event inline.
                }
            </text>)
        )
        ... //Additional configuration
    )
```

```Razor TagHelper
    <kendo-tilelayout name="tilelayout" reorderable="true" 
        on-reorder="function() {
            // Handle the TileLayout Reorder event inline.
        }">
        
    </kendo-tilelayout>
```

## Next Steps

* [Using the TileLayout Events (Demo)](https://demos.telerik.com/aspnet-core/tilelayout/events)

## See Also

* [Client-Side API of the TileLayout](https://docs.telerik.com/kendo-ui/api/ui/tilelayout)
* [Server-Side API of the TileLayout](https://www.telerik.com/aspnet-core-ui/documentation/api/tilelayout)
