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 AjaxDataSourceBuilderBase<TModel, TDataSourceBuilder> where TModel : class where TDataSourceBuilder : AjaxDataSourceBuilderBase<TModel, TDataSourceBuilder>
Inheritance: objectAjaxDataSourceBuilderBase<TModel, TDataSourceBuilder>
Derived Classes:
Inherited Members
Constructors
public AjaxDataSourceBuilderBase(DataSource dataSource, ViewContext viewContext, IUrlGenerator urlGenerator)
Fields
protected readonly DataSource dataSource
protected readonly IUrlGenerator urlGenerator
viewContext
ViewContext
protected readonly ViewContext viewContext
Methods
Configures whether diacritic filtering should be used.
public virtual TDataSourceBuilder AccentFoldingFiltering(string culture)
The culture applied for the Action
Returns:TDataSourceBuilder
Configures the initial aggregates.
public virtual TDataSourceBuilder Aggregates(Action<DataSourceAggregateDescriptorFactory<TModel>> aggregates)
The Aggregates set for the DataSource
Returns:TDataSourceBuilder
When enabled filtering is case sensitive
public virtual TDataSourceBuilder CaseSensitiveFiltering()
TDataSourceBuilder
Configures the client-side events
public TDataSourceBuilder Events(Action<DataSourceEventBuilder> configurator)
The lambda which configures the Update Action
Returns:TDataSourceBuilder
Configures the initial filter.
public virtual TDataSourceBuilder Filter(Action<DataSourceFilterDescriptorFactory<TModel>> configurator)
The lambda which configures the Filter Action
Returns:TDataSourceBuilder
Configures the initial grouping.
public virtual TDataSourceBuilder Group(Action<DataSourceGroupDescriptorFactory<TModel>> configurator)
The lambda which configures the Group Action
Returns:TDataSourceBuilder
Enables/disables group paging.
public TDataSourceBuilder GroupPaging(bool enabled)
TDataSourceBuilder
Configures Model properties
public virtual TDataSourceBuilder Model(Action<DataSourceModelDescriptorFactory<TModel>> configurator)
The lambda which configures the Model instance
Returns:TDataSourceBuilder
Specifies custom implementation for offline storage.
Sets the key used for offline state persistance.
public TDataSourceBuilder OfflineStorage(string key)
TDataSourceBuilder
Sets the number of records displayed on a single page.
public TDataSourceBuilder PageSize(int pageSize)
An integer value for the size of a Page in the DataSource
Returns:TDataSourceBuilder
Configures the URL for Read operation.
public TDataSourceBuilder Read(Action<CrudOperationBuilder> configurator)
The lambda which configures the Read Action
Returns: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
Configures the OperationUrl
protected virtual void SetOperationUrl(CrudOperation operation, string actionName, string controllerName, object routeValues)
The CRUD operation
actionNamestringThe name of the Action
controllerNamestringThe name of the Controller
routeValuesobjectThe root values for the Action
Configures the initial sorting.
public virtual TDataSourceBuilder Sort(Action<DataSourceSortDescriptorFactory<TModel>> configurator)
The lambda which configures the Sort Action
Returns:TDataSourceBuilder
Sets the total number of records in the data source. Required during Custom binding.
public TDataSourceBuilder Total(int total)
Number of records
Returns:TDataSourceBuilder