New to Telerik UI for ASP.NET Core? Download free 30-day trial

Events

The Telerik UI PropertyGrid for ASP.NET Core exposes various events 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.

Handling by Handler Name

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

    @model PropertyViewModel

    @(Html.Kendo().PropertyGrid<PropertyViewModel>()
        .Name("propertyGrid")
        .Events(e => e.Edit("onEdit"))
        ... //Additional configuration
    )
    @addTagHelper *, Kendo.Mvc
    @model PropertyViewModel

    <kendo-propertygrid name="propertyGrid" on-edit="onEdit">
      <!-- Additional configuration -->
    </kendo-propertygrid>
    <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.

    @model PropertyViewModel

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

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

Next Steps

See Also

In this article