# ReadOnlyWebApiDataSourceBuilder

## Methods

### Events(System.Action)

Configures the client-side events

#### Parameters

##### configurator - System.Action<[DataSourceEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceeventbuilder)>

### Read(System.Action)

Configures the URL for Read operation.

#### Parameters

##### configurator - System.Action<[CrudOperationBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/crudoperationbuilder)>

The read configuration.

#### RETURNS

A  instance for method chaining.

#### Example

```
 
               @(Html.Kendo().DataSource<OrderViewModel>()
                           .Name("ds")
                           .WebApi(x=> {
                                 x.Read(r=>r.Action("Action", "Controller"));
                           })
               )
             
```

### Read(System.String)

Sets controller and action for Read operation.

#### Parameters

##### url - `System.String`

Absolute or relative URL for the operation

#### RETURNS

A  instance for method chaining.

#### Example

```
 
               @(Html.Kendo().DataSource<OrderViewModel>()
                           .Name("ds")
                           .WebApi(x=> {
                                x.Read("url");
                           })
               )
             
```

### Read(System.String,System.String,System.Object)

Sets controller and action for Read operation.

#### Parameters

##### actionName - `System.String`

Action name

##### controllerName - `System.String`

Controller Name

##### routeValues - `System.Object`

Route values

#### RETURNS

A  instance for method chaining.

#### Example

```
 
               @(Html.Kendo().DataSource<OrderViewModel>()
                           .Name("ds")
                           .WebApi(x=> {
                                x.Read("Action", "Controller", new { });
                           })
               )
             
```

### Read(System.String,System.String)

Sets controller, action and routeValues for Read operation.

#### Parameters

##### actionName - `System.String`

Action name

##### controllerName - `System.String`

Controller Name

#### Example

```
 
               @(Html.Kendo().DataSource<OrderViewModel>()
                           .Name("ds")
                           .WebApi(x=> {
                                x.Read("Action", "Controller");
                           })
               )
             
```

### Total(System.Int32)

Sets the total number of records in the data source. Required during Custom binding.

#### Parameters

##### total - `System.Int32`

Number of records

#### RETURNS

A  instance for method chaining.

#### Example

```
 
               @(Html.Kendo().DataSource<OrderViewModel>()
                           .Name("ds")
                           .WebApi(x=> {
                                x.Total(10);
                           })
               )
             
```

### PageSize(System.Int32)

Sets the number of records displayed on a single page.

#### Parameters

##### pageSize - `System.Int32`

The count of records per page.

#### RETURNS

A  instance for method chaining.

#### Example

```
 
               @(Html.Kendo().DataSource<OrderViewModel>()
                           .Name("ds")
                           .WebApi(x=> {
                                x.PageSize(10);
                           })
               )
             
```

### OfflineStorage(System.String)

Sets the key used for offline state persistance.

#### Parameters

##### key - `System.String`

The offline storage key name.

#### RETURNS

A  instance for method chaining.

#### Example

```
 
               @(Html.Kendo().DataSource<OrderViewModel>()
                           .Name("ds")
                           .WebApi(x=> {
                                x.OfflineStorage("key");
                           })
               )
             
```

### AccentFoldingFiltering(System.String)

Configures whether diacritic filtering should be used.

#### Parameters

##### culture - `System.String`

The used culture.

#### RETURNS

A  instance for method chaining.

#### Example

```
 
               @(Html.Kendo().DataSource<OrderViewModel>()
                           .Name("ds")
                           .WebApi(x=> {
                                x.AccentFoldingFiltering("de-DE");
                           })
               )
             
```

### OfflineStorage(System.String,System.String)

Specifies custom implementation for offline storage.

#### Parameters

##### getItem - `System.String`

The name of the JavaScript function which returns the offline state.

##### setItem - `System.String`

The name of the JavaScript function which saves the offline state.

#### RETURNS

A  instance for method chaining.

#### Example

```
 
               @(Html.Kendo().DataSource<OrderViewModel>()
                           .Name("ds")
                           .WebApi(x=> {
                                x.OfflineStorage("Get", "Set");
                           })
               )
             
```

### Culture(System.String)

Configures what culture.

#### Parameters

##### culture - `System.String`

The used culture.

#### RETURNS

A  instance for method chaining.

#### Example

```
 
               @(Html.Kendo().DataSource<OrderViewModel>()
                           .Name("ds")
                           .WebApi(x=> {
                                x.Culture("de-DE");
                           })
               )
             
```

### ServerOperation(System.Boolean)

Sets the operation mode of the DataSource. By default the DataSource will make a request to the server when data for paging, sorting, filtering or grouping is needed. If set to false all data will be requested through single request. Any other paging, sorting, filtering or grouping will be performed client-side.

#### Parameters

##### enabled - `System.Boolean`

True(default) if server operation mode is enabled, otherwise false.

#### RETURNS

A  instance for method chaining.

#### Example

```
 
               @(Html.Kendo().DataSource<OrderViewModel>()
                           .Name("ds")
                           .WebApi(x=> {
                               x.ServerOperation(true);
                           })
               )
             
```

### Sort(System.Action)

Configures the initial sorting.

#### Parameters

##### configurator - System.Action<[DataSourceSortDescriptorFactory](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourcesortdescriptorfactory)>

The sort configurator.

#### RETURNS

A  instance for method chaining.

#### Example

```
 
               @(Html.Kendo().DataSource<OrderViewModel>()
                           .Name("ds")
                           .WebApi(x=> {
                               x.Sort(y=>y.Add("OrderID"));
                           })
               )
             
```

### Group(System.Action)

Configures the initial grouping.

#### Parameters

##### configurator - System.Action<[DataSourceGroupDescriptorFactory](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourcegroupdescriptorfactory)>

The group configurator.

#### RETURNS

A  instance for method chaining.

#### Example

```
 
               @(Html.Kendo().DataSource<OrderViewModel>()
                           .Name("ds")
                           .WebApi(x=> {
                               x.Group(y=>y.Add("OrderID", typeof(int)));
                           })
               )
             
```

### Aggregates(System.Action)

Configures the initial aggregates.

#### Parameters

##### aggregates - System.Action<[DataSourceAggregateDescriptorFactory](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceaggregatedescriptorfactory)>

The Aggregates configurator.

#### RETURNS

A  instance for method chaining.

#### Example

```
 
               @(Html.Kendo().DataSource<OrderViewModel>()
                           .Name("ds")
                           .WebApi(x=> {
                               x.Aggregates(y=>y.Add("OrderID", typeof(int)).Average());
                           })
               )
             
```

### Filter(System.Action)

Configures the initial filter.

#### Parameters

##### configurator - System.Action<[DataSourceFilterDescriptorFactory](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourcefilterdescriptorfactory)>

The Filter configurator.

#### RETURNS

A  instance for method chaining.

#### Example

```
 
               @(Html.Kendo().DataSource<OrderViewModel>()
                           .Name("ds")
                           .WebApi(x=> {
                               x.Filter(y=>y.Add(z=>z.ContactName != "Condition"));
                           })
               )
             
```

### Model(System.Action)

Configures Model properties

#### Parameters

##### configurator - System.Action<[DataSourceModelDescriptorFactory](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourcemodeldescriptorfactory)>

The Model configurator.

#### RETURNS

A  instance for method chaining.

#### Example

```
 
               @(Html.Kendo().DataSource<OrderViewModel>()
                           .Name("ds")
                           .WebApi(x=> {
                               x.Model(m => m.Id(id => id.OrderID));
                           })
               )
             
```

### CaseSensitiveFiltering()

When enabled filtering is case sensitive

#### RETURNS

A  instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                .WebApi()
                .CaseSensitiveFiltering()
            )
             
```

### Schema(System.Action)

Configures the WebApi schema

#### Parameters

##### configurator - System.Action<[WebApiDataSourceSchemaBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/webapidatasourceschemabuilder)>
