# DataSourceEventBuilder

## Methods

### Change(System.String)

Defines the name of the JavaScript function that will handle the Change client-side event.

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

#### Parameters

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

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

#### RETURNS

The [DataSourceEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceeventbuilder) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(e => e.Change("onChangeDS"))
            )
             
```

### Change(System.Func)

Defines the inline handler of the Change client-side event.

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

#### Parameters

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

The handler code wrapped in a text tag (Razor syntax).

#### RETURNS

The [DataSourceEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceeventbuilder) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(events => events.Change(
                        @<text>
                        function(e) {
                            //event handling code
                        }
                        </text>
                    ))
            )
             
```

### Sync(System.String)

Defines the name of the JavaScript function that will handle the Sync client-side event.

For more information see [Sync](https://docs.telerik.com/kendo-ui/api/ui/datasource/events/sync) event.

#### Parameters

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

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

#### RETURNS

The [DataSourceEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceeventbuilder) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(e => e.Sync("onSyncDS"))
            )
             
```

### Sync(System.Func)

Defines the inline handler of the Sync client-side event.

For more information see [Sync](https://docs.telerik.com/kendo-ui/api/ui/datasource/events/sync) event.

#### Parameters

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

The handler code wrapped in a text tag (Razor syntax).

#### RETURNS

The [DataSourceEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceeventbuilder) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(events => events.Sync(
                        @<text>
                        function(e) {
                            //event handling code
                        }
                        </text>
                    ))
            )
             
```

### RequestStart(System.String)

Defines the name of the JavaScript function that will handle the RequestStart client-side event.

For more information see [RequestStart](https://docs.telerik.com/kendo-ui/api/ui/datasource/events/requeststart) event.

#### Parameters

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

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

#### RETURNS

The [DataSourceEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceeventbuilder) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(e => e.RequestStart("onRequestStartDS"))
            )
             
```

### RequestStart(System.Func)

Defines the inline handler of the RequestStart client-side event.

For more information see [RequestStart](https://docs.telerik.com/kendo-ui/api/ui/datasource/events/requeststart) event.

#### Parameters

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

The handler code wrapped in a text tag (Razor syntax).

#### RETURNS

The [DataSourceEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceeventbuilder) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(events => events.RequestStart(
                        @<text>
                        function(e) {
                            //event handling code
                        }
                        </text>
                    ))
            )
             
```

### RequestEnd(System.String)

Defines the name of the JavaScript function that will handle the RequestEnd client-side event.

For more information see [RequestEnd](https://docs.telerik.com/kendo-ui/api/ui/datasource/events/requestend) event.

#### Parameters

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

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

#### RETURNS

The [DataSourceEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceeventbuilder) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(e => e.RequestEnd("onRequestEndDS"))
            )
             
```

### RequestEnd(System.Func)

Defines the inline handler of the RequestEnd client-side event.

For more information see [RequestEnd](https://docs.telerik.com/kendo-ui/api/ui/datasource/events/requestend) event.

#### Parameters

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

The handler code wrapped in a text tag (Razor syntax).

#### RETURNS

The [DataSourceEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceeventbuilder) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(events => events.RequestEnd(
                        @<text>
                        function(e) {
                            //event handling code
                        }
                        </text>
                    ))
            )
             
```

### Error(System.String)

Defines the name of the JavaScript function that will handle the Error client-side event.

For more information see [Error](https://docs.telerik.com/kendo-ui/api/ui/datasource/events/error) event.

#### Parameters

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

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

#### RETURNS

The [DataSourceEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceeventbuilder) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(e => e.Error("onErrorDS"))
            )
             
```

### Error(System.Func)

Defines the inline handler of the Error client-side event.

For more information see [Error](https://docs.telerik.com/kendo-ui/api/ui/datasource/events/error) event.

#### Parameters

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

The handler code wrapped in a text tag (Razor syntax).

#### RETURNS

The [DataSourceEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceeventbuilder) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(events => events.Error(
                        @<text>
                        function(e) {
                            //event handling code
                        }
                        </text>
                    ))
            )
             
```

### Push(System.String)

Defines the name of the JavaScript function that will handle the Push client-side event.

For more information see [Push](https://docs.telerik.com/kendo-ui/api/ui/datasource/events/push) event.

#### Parameters

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

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

#### RETURNS

The [DataSourceEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceeventbuilder) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(e => e.Push("onPushDS"))
            )
             
```

### Push(System.Func)

Defines the inline handler of the Push client-side event.

For more information see [Push](https://docs.telerik.com/kendo-ui/api/ui/datasource/events/push) event.

#### Parameters

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

The handler code wrapped in a text tag (Razor syntax).

#### RETURNS

The [DataSourceEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceeventbuilder) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(events => events.Push(
                        @<text>
                        function(e) {
                            //event handling code
                        }
                        </text>
                    ))
            )
             
```
