# Events

The Telerik UI PropertyGrid for ASP.NET Core [exposes various events](https://www.telerik.com/aspnet-core-ui/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-core/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
    )
```

```Razor TagHelper
    @addTagHelper *, Kendo.Mvc
    @model PropertyViewModel

    <kendo-propertygrid name="propertyGrid" on-edit="onEdit">
      
    </kendo-propertygrid>
```

```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
    )
```

```Razor TagHelper
    @addTagHelper *, Kendo.Mvc
    @model PropertyViewModel

    <kendo-propertygrid name="propertyGrid" 
        on-edit="function() {
            // Handle the PropertyGrid Edit event inline.
        }">
    </kendo-propertygrid>
```

## Next Steps

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

## See Also

* [Using the API of the PropertyGrid for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/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-core-ui/documentation/api/propertygrid)

* [Server-Side API of the PropertyGrid TagHelper](https://www.telerik.com/aspnet-core-ui/documentation/api/taghelpers/propertygrid)
