# Events

The Telerik UI Spreadsheet for ASP.NET MVC [exposes a number of JavaScript events](https://www.telerik.com/aspnet-mvc/documentation/api/kendo.mvc.ui.fluent/spreadsheeteventbuilder) that allow you to control the behavior of the UI component.

For a complete example of how to handle all Spreadsheet events triggered by user interaction, refer to the [demo on using the events of the Spreadsheet ](https://demos.telerik.com/aspnet-mvc/spreadsheet/events).

## Subscribing to Events

The following example demonstrates how to subscribe to the `Changing` and `Change` events.

```Razor HtmlHelper
    @(Html.Kendo().Spreadsheet()
        .Name("spreadsheet")
        .Events(events => events
            .Changing("onChanging")
            .Change("onChange")
        )
        .Sheets(sheets =>
        {
            sheets.Add()
                .Name("Sheet1")
                .Columns(columns =>
                {
                    columns.Add().Width(115);
                })
                .Rows(rows =>
                {
                    rows.Add().Height(25).Cells(cells =>
                    {
                        cells.Add()
                            .Value("ID")
                            .TextAlign(SpreadsheetTextAlign.Center);
                    });
                });
        })
    )

    <script>
        function onChanging(e) {
            // Handle the changing event.
        }

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

## Next Steps

* [Basic Usage of the Spreadsheet for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/spreadsheet)
* [Using the Spreadsheet Events (Demo)](https://demos.telerik.com/aspnet-core/spreadsheet/events)

## See Also

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