# DialogEventBuilder

## Methods

### Close(System.String)

Defines the handler of the Close client-side event. Triggered when a Dialog is closed (by a user or through the close() method).

For more information see [Close](https://docs.telerik.com/kendo-ui/api/ui/dialog/events/close) event.

#### Parameters

##### handler - `System.String`

The name of the JavaScript function that will handle the Close event.

#### RETURNS

Returns the current instance of [DialogEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/dialogeventbuilder) .

#### Example

```
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Events(events => events.Close("onClose"))
            )
             
```

### Close(System.Func)

Defines the handler of the Close client-side event. Triggered when a Dialog is closed (by a user or through the close() method).

For more information see [Close](https://docs.telerik.com/kendo-ui/api/ui/dialog/events/close) event.

#### Parameters

##### handler - `System.Func<Object,Object>`

The handler code wrapped in a text tag.

#### RETURNS

Returns the current instance of [DialogEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/dialogeventbuilder) .

#### Example

```
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Events(events => events.Close(
                      @<text>
                      function(e) {
                          //event handling code
                      }
                      </text>
                 ))
            )
             
```

### Hide(System.String)

Defines the handler of the Hide client-side event. Triggered when a Dialog has finished its closing animation.

For more information see [Hide](https://docs.telerik.com/kendo-ui/api/ui/dialog/events/hide) event.

#### Parameters

##### handler - `System.String`

The name of the JavaScript function that will handle the Hide event.

#### RETURNS

Returns the current instance of [DialogEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/dialogeventbuilder) .

#### Example

```
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Events(events => events.Hide("onHide"))
            )
             
```

### Hide(System.Func)

Defines the handler of the Hide client-side event. Triggered when a Dialog has finished its closing animation.

For more information see [Hide](https://docs.telerik.com/kendo-ui/api/ui/dialog/events/hide) event.

#### Parameters

##### handler - `System.Func<Object,Object>`

The handler code wrapped in a text tag.

#### RETURNS

Returns the current instance of [DialogEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/dialogeventbuilder) .

#### Example

```
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Events(events => events.Hide(
                      @<text>
                      function(e) {
                          //event handling code
                      }
                      </text>
                 ))
            )
             
```

### InitOpen(System.String)

Defines the handler of the InitOpen client-side event. Triggered when a Dialog is opened for the first time (i.e. the open() method is called).

For more information see [InitOpen](https://docs.telerik.com/kendo-ui/api/ui/dialog/events/initopen) event.

#### Parameters

##### handler - `System.String`

The name of the JavaScript function that will handle the InitOpen event.

#### RETURNS

Returns the current instance of [DialogEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/dialogeventbuilder) .

#### Example

```
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Events(events => events.InitOpen("onInitOpen"))
            )
             
```

### InitOpen(System.Func)

Defines the handler of the InitOpen client-side event. Triggered when a Dialog is opened for the first time (i.e. the open() method is called).

For more information see [InitOpen](https://docs.telerik.com/kendo-ui/api/ui/dialog/events/initopen) event.

#### Parameters

##### handler - `System.Func<Object,Object>`

The handler code wrapped in a text tag.

#### RETURNS

Returns the current instance of [DialogEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/dialogeventbuilder) .

#### Example

```
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Events(events => events.InitOpen(
                      @<text>
                      function(e) {
                          //event handling code
                      }
                      </text>
                 ))
            )
             
```

### Open(System.String)

Defines the handler of the Open client-side event. Triggered when a Dialog is opened (i.e. the open() method is called).

For more information see [Open](https://docs.telerik.com/kendo-ui/api/ui/dialog/events/open) event.

#### Parameters

##### handler - `System.String`

The name of the JavaScript function that will handle the Open event.

#### RETURNS

Returns the current instance of [DialogEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/dialogeventbuilder) .

#### Example

```
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Events(events => events.Open("onOpen"))
            )
             
```

### Open(System.Func)

Defines the handler of the Open client-side event. Triggered when a Dialog is opened (i.e. the open() method is called).

For more information see [Open](https://docs.telerik.com/kendo-ui/api/ui/dialog/events/open) event.

#### Parameters

##### handler - `System.Func<Object,Object>`

The handler code wrapped in a text tag.

#### RETURNS

Returns the current instance of [DialogEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/dialogeventbuilder) .

#### Example

```
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Events(events => events.Open(
                      @<text>
                      function(e) {
                          //event handling code
                      }
                      </text>
                 ))
            )
             
```

### Show(System.String)

Defines the handler of the Show client-side event. Triggered when a Dialog has finished its opening animation.

For more information see [Show](https://docs.telerik.com/kendo-ui/api/ui/dialog/events/show) event.

#### Parameters

##### handler - `System.String`

The name of the JavaScript function that will handle the Show event.

#### RETURNS

Returns the current instance of [DialogEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/dialogeventbuilder) .

#### Example

```
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Events(events => events.Show("onShow"))
            )
             
```

### Show(System.Func)

Defines the handler of the Show client-side event. Triggered when a Dialog has finished its opening animation.

For more information see [Show](https://docs.telerik.com/kendo-ui/api/ui/dialog/events/show) event.

#### Parameters

##### handler - `System.Func<Object,Object>`

The handler code wrapped in a text tag.

#### RETURNS

Returns the current instance of [DialogEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/dialogeventbuilder) .

#### Example

```
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Events(events => events.Show(
                      @<text>
                      function(e) {
                          //event handling code
                      }
                      </text>
                 ))
            )
             
```

### KendoKeydown(System.String)

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the Dialog is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see [KendoKeydown](https://docs.telerik.com/kendo-ui/api/ui/dialog/events/kendokeydown) event.

#### Parameters

##### handler - `System.String`

The name of the JavaScript function that will handle the KendoKeydown event.

#### RETURNS

Returns the current instance of [DialogEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/dialogeventbuilder) .

### KendoKeydown(System.Func)

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the Dialog is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see [KendoKeydown](https://docs.telerik.com/kendo-ui/api/ui/dialog/events/kendokeydown) event.

#### Parameters

##### handler - `System.Func<Object,Object>`

The handler code wrapped in a text tag.

#### RETURNS

Returns the current instance of [DialogEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/dialogeventbuilder) .
