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

Events

The Telerik UI Dialog component for ASP.NET MVC exposes the Close, Hide, InitOpen, Open, and Show events. You can handle these events to implement custom functionality.

For a complete example on basic Dialog events, refer to the demo on using the events of the Dialog.

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

    @(Html.Kendo().Dialog()
        .Name("dialog")
        .Events(e => e
            .InitOpen("onInitOpen")
            .Open("dialog_open")
            .Close("dialog_close")
            .Show("onShow")
            .Hide("onHide")
        )
    )
    <script>
        function onInitOpen(e) {
            // Handle the InitOpen event.
        }

        function onOpen(e) {
            // Handle the open event.
        }

        function onClose(e) {
            // Handle the close event.
        }

        function onShow(e) {
            // Handle the show event.
        }

        function onHide(e) {
            // Handle the hide event.
        }
    </script>

Next Steps

See Also

In this article