# Events

The OrgChart exposes a variety of [events](https://www.telerik.com/aspnet-mvc/documentation/api/kendo.mvc.ui.fluent/orgcharteventbuilder) that you can handle and further customize the behavior of the UI component.

For a complete example on the OrgChart events, refer to the [OrgChart Events Demo](https://demos.telerik.com/aspnet-mvc/orgchart/events).

## Handling by Handler Name

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

```Razor HtmlHelper
    @(Html.Kendo().OrgChart()
      .Name("orgchart")
      .Events(e => e
            .Select("onSelect")
            .Change("onChange")
      )
    )
```

```JavaScript
    <script>
        function onSelect(e) {
            // Handle the "select" event.
        }

        function onChange(e) {
            // Handle the "change" event.
        }
    </script>
```

## Handling by Template Delegate

The following example demonstrates how to subscribe to events by a template delegate.

```Razor HtmlHelper
    @(Html.Kendo().OrgChart()
      .Name("orgchart")
      .Events(e => e
            .Select(@<text>
                function() {
                    // Handle the select event inline.
                }
            </text>)
            .Change(@<text>
                function() {
                    // Handle the change event inline.
                }
            </text>)
      )
    )
```

## Next Steps

* [Using the OrgChart Events (Demo)](https://demos.telerik.com/aspnet-mvc/orgchart/events)

## See Also

* [Using the API of the OrgChart for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/orgchart/api)
* [Client-Side API of the OrgChart](https://docs.telerik.com/kendo-ui/api/ui/orgchart)
* [Server-Side API of the OrgChart](https://www.telerik.com/aspnet-mvc/documentation/api/orgchart)
