# Events

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

For a complete example on basic PropertyGrid events, refer to the [demo on using the events of the PropertyGrid](https://demos.telerik.com/aspnet-mvc/propertygrid/events).

## Handling by Handler Name

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

```Razor HtmlHelper
    @model PropertyViewModel

    @(Html.Kendo().PropertyGrid<PropertyViewModel>()
        .Name("propertyGrid")
        .Events(e => e.Edit("onEdit"))
        ... //Additional configuration
    )
```

```JS scripts
    <script>
        function onEdit(e){
            // Handle the PropertyGrid Edit event that triggers when the user edits a data item.
        };
    </script>
```

## Handling by Template Delegate

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

```Razor HtmlHelper
    @model PropertyViewModel

    @(Html.Kendo().PropertyGrid<PropertyViewModel>()
        .Name("propertyGrid")
        .Events(e => e.Edit(@<text>
                function() {
                    // Handle the PropertyGrid Edit event inline.
                }
            </text>)
        )
        ... //Additional configuration
    )
```

## Next Steps

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

## See Also

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