# SwitchEventBuilder

## Methods

### Change(System.String)

Defines the handler of the Change client-side event. Fires when the checked state of the Switch is changed through user interaction.

For more information see [Change](https://docs.telerik.com/kendo-ui/api/ui/switch/events/change) event.

#### Parameters

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

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

#### RETURNS

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

#### Example

```
 
             @( Html.Kendo().Switch()
                        .Name("switch")
                        .Events(events => events
                            .Change("onChange")
                        )
            )
             
```

### Change(System.Func)

Defines the handler of the Change client-side event. Fires when the checked state of the Switch is changed through user interaction.

For more information see [Change](https://docs.telerik.com/kendo-ui/api/ui/switch/events/change) event.

#### Parameters

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

The handler code wrapped in a text tag.

#### RETURNS

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

#### Example

```
 
             @(Html.Kendo().Switch()
                       .Name("switch")
                    .Events(events => events.Change(@<text>
                           function(e) {
                           // Handle the Change event
                           }
                           </text>)
                     )
            )
             
```

### KendoKeydown(System.String)

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the Switch 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/switch/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 [SwitchEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/switcheventbuilder) .

### KendoKeydown(System.Func)

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the Switch 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/switch/events/kendokeydown) event.

#### Parameters

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

The handler code wrapped in a text tag.

#### RETURNS

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