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

Defines the fluent interface for configuring the DataSource component.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TModel

Syntax:

C#
public class DataSourceBuilder<TModel> where TModel : class

Inheritance: objectDataSourceBuilder<TModel>

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public DataSourceBuilder(DataSource dataSource, ViewContext viewContext, IUrlGenerator urlGenerator)
Parameters:dataSourceDataSourceviewContextViewContexturlGeneratorIUrlGenerator

Fields

C#
protected readonly DataSource dataSource
C#
protected readonly IUrlGenerator urlGenerator

viewContext

ViewContext

C#
protected readonly ViewContext viewContext

Methods

Use it to configure Ajax binding.

C#
public AjaxDataSourceBuilder<TModel> Ajax()
Returns:

AjaxDataSourceBuilder<TModel>

Example:
C#
.DataSource(dataSource =&gt; dataSource
.Ajax()
)

Use it to configure Custom binding.

C#
public CustomDataSourceBuilder<TModel> Custom()
Returns:

CustomDataSourceBuilder<TModel>

Example:
C#
.DataSource(dataSource =&gt; dataSource
.Custom()
)

Use it to configure Server binding.

C#
public ServerDataSourceBuilder<TModel> Server()
Returns:

ServerDataSourceBuilder<TModel>

Example:
C#
.DataSource(dataSource =&gt; dataSource
.Server()
)

Use it to configure SignalR binding.

C#
public SignalRDataSourceBuilder<TModel> SignalR()
Returns:

SignalRDataSourceBuilder<TModel>

Example:
C#
.DataSource(dataSource =&gt; dataSource
.SignalR()
)

Use it to configure WebApi binding.

C#
public AjaxDataSourceBuilder<TModel> WebApi()
Returns:

AjaxDataSourceBuilder<TModel>

Example:
C#
.DataSource(dataSource =&gt; dataSource
.WebApi()
)