Defines the fluent interface for configuring the DataSource options.
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Type Parameters:
TModel
TDataSourceBuilder
Syntax:
public abstract class WebApiDataSourceBuilderBase<TModel, TDataSourceBuilder> where TModel : class where TDataSourceBuilder : WebApiDataSourceBuilderBase<TModel, TDataSourceBuilder>
Inheritance: objectWebApiDataSourceBuilderBase<TModel, TDataSourceBuilder>
Derived Classes:
Inherited Members
Constructors
WebApiDataSourceBuilderBase method.
public WebApiDataSourceBuilderBase(DataSource dataSource, ViewContext viewContext, IUrlGenerator urlGenerator)
Fields
dataSource member.
protected readonly DataSource dataSource
urlGenerator member.
protected readonly IUrlGenerator urlGenerator
viewContext member.
protected readonly ViewContext viewContext
Methods
Configures whether diacritic filtering should be used.
public TDataSourceBuilder AccentFoldingFiltering(string culture)
The used culture.
Returns:TDataSourceBuilder
A TDataSourceBuilder instance for method chaining.
Configures the initial aggregates.
public virtual TDataSourceBuilder Aggregates(Action<DataSourceAggregateDescriptorFactory<TModel>> aggregates)
The Aggregates configurator.
Returns:TDataSourceBuilder
A TDataSourceBuilder instance for method chaining.
When enabled filtering is case sensitive
public virtual TDataSourceBuilder CaseSensitiveFiltering()
TDataSourceBuilder
A TDataSourceBuilder instance for method chaining.
Configures what culture.
public TDataSourceBuilder Culture(string culture)
The used culture.
Returns:TDataSourceBuilder
A TDataSourceBuilder instance for method chaining.
Configures the client-side events
public TDataSourceBuilder Events(Action<DataSourceEventBuilder> configurator)
TDataSourceBuilder
Configures the initial filter.
public virtual TDataSourceBuilder Filter(Action<DataSourceFilterDescriptorFactory<TModel>> configurator)
The Filter configurator.
Returns:TDataSourceBuilder
A TDataSourceBuilder instance for method chaining.
Configures the initial grouping.
public virtual TDataSourceBuilder Group(Action<DataSourceGroupDescriptorFactory<TModel>> configurator)
The group configurator.
Returns:TDataSourceBuilder
A TDataSourceBuilder instance for method chaining.
Configures Model properties
public virtual TDataSourceBuilder Model(Action<DataSourceModelDescriptorFactory<TModel>> configurator)
The Model configurator.
Returns:TDataSourceBuilder
A TDataSourceBuilder instance for method chaining.
Specifies custom implementation for offline storage.
public TDataSourceBuilder OfflineStorage(string getItem, string setItem)
The name of the JavaScript function which returns the offline state.
setItemstringThe name of the JavaScript function which saves the offline state.
Returns:TDataSourceBuilder
A TDataSourceBuilder instance for method chaining.
Sets the key used for offline state persistance.
public TDataSourceBuilder OfflineStorage(string key)
The offline storage key name.
Returns:TDataSourceBuilder
A TDataSourceBuilder instance for method chaining.
Sets the number of records displayed on a single page.
public TDataSourceBuilder PageSize(int pageSize)
The count of records per page.
Returns:TDataSourceBuilder
A TDataSourceBuilder instance for method chaining.
Configures the URL for Read operation.
public TDataSourceBuilder Read(Action<CrudOperationBuilder> configurator)
The read configuration.
Returns:TDataSourceBuilder
A TDataSourceBuilder instance for method chaining.
Sets controller and action for Read operation.
Sets controller and action for Read operation.
public TDataSourceBuilder Read(string url)
Absolute or relative URL for the operation
Returns:TDataSourceBuilder
A TDataSourceBuilder instance for method chaining.
Configures the WebApi schema
public TDataSourceBuilder Schema(Action<WebApiDataSourceSchemaBuilder> configurator)
TDataSourceBuilder
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.
public TDataSourceBuilder ServerOperation(bool enabled)
True(default) if server operation mode is enabled, otherwise false.
Returns:TDataSourceBuilder
A TDataSourceBuilder instance for method chaining.
SetOperationUrl method.
protected virtual void SetOperationUrl(CrudOperation operation, string actionName, string controllerName, object routeValues)
Configures the initial sorting.
public virtual TDataSourceBuilder Sort(Action<DataSourceSortDescriptorFactory<TModel>> configurator)
The sort configurator.
Returns:TDataSourceBuilder
A TDataSourceBuilder instance for method chaining.
Sets the total number of records in the data source. Required during Custom binding.
public TDataSourceBuilder Total(int total)
Number of records
Returns:TDataSourceBuilder
A TDataSourceBuilder instance for method chaining.