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

Events

The Telerik UI PropertyGrid for ASP.NET MVC 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
    )
    <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
    )

Next Steps

See Also

In this article