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

Definition

Constructors

C#
public DataSource()

Properties

It allows the filtering operation to be performed considering the diacritic characters for specific language.

C#
public string AccentFoldingFiltering { get; set; }
C#
public IEnumerable<AggregateResult> AggregateResults { get; set; }

The aggregates which are calculated when the data source populates with data. The supported aggregates are: "average" - Only for Number. "count" - String, Number and Date. "max" - Number and Date. "min" - Number and Date. "sum" - Only for Number.

C#
public IList<AggregateDescriptor> Aggregates { get; }
C#
public bool AutoSync { get; set; }

If set to true, the data source will batch CRUD operation requests. For example, updating two data items would cause one HTTP request instead of two. By default, the data source makes an HTTP request for every CRUD operation.

C#
public bool Batch { get; set; }
C#
public IDictionary<string, object> CustomTransport { get; set; }
C#
public string CustomType { get; set; }
C#
public IEnumerable Data { get; set; }

The events configuration.

C#
public IDictionary<string, object> Events { get; }

The filters which are applied over the data items. By default, no filter is applied.

C#
public IList<IFilterDescriptor> Filters { get; }

The grouping configuration of the data source. If set, the data items will be grouped when the data source is populated. By default, grouping is not applied.

C#
public bool GroupPaging { get; set; }

The grouping configuration of the data source. If set, the data items will be grouped when the data source is populated. By default, grouping is not applied.

C#
public IList<GroupDescriptor> Groups { get; }
C#
public bool IsClientBinding { get; }
C#
public bool IsClientOperationMode { get; }
C#
public IDictionary<string, object> OfflineStorage { get; set; }
C#
public string OfflineStorageKey { get; set; }
C#
public IList<SortDescriptor> OrderBy { get; }

The page of data which the data source will return when the view method is invoked.

C#
public int Page { get; set; }

The number of data items per page. The property has no default value. Therefore, to use paging, make sure some pageSize value is set.

C#
public int PageSize { get; set; }
C#
public IEnumerable RawData { get; set; }

The configuration used to parse the remote service response.

C#
public DataSourceSchema Schema { get; }

If set to true, the data source will leave the aggregate calculation to the remote service. By default, the data source calculates aggregates client-side.

C#
public bool ServerAggregates { get; set; }

If set to true, the data source will leave the filtering implementation to the remote service. By default, the data source performs filtering client-side.

C#
public bool ServerFiltering { get; set; }

If set to true, the data source will leave the grouping implementation to the remote service. By default, the data source performs grouping client-side.

C#
public bool ServerGrouping { get; set; }

If set to true, the data source will leave the data item paging implementation to the remote service. By default, the data source performs paging client-side.

C#
public bool ServerPaging { get; set; }

If set to true, the data source will leave the data item sorting implementation to the remote service. By default, the data source performs sorting client-side.

C#
public bool ServerSorting { get; set; }

The total number of data items.

C#
public int Total { get; set; }

The number of available pages.

C#
public int TotalPages { get; set; }

The configuration used to load and save the data items. A data source is remote or local based on the way it retrieves data items. Remote data sources load and save data items from and to a remote end-point (also known as remote service or server). The transport option describes the remote service configuration - URL, HTTP verb, HTTP headers, and others. The transport option can also be used to implement custom data loading and saving. Local data sources are bound to a JavaScript array via the data option.

C#
public Transport Transport { get; protected set; }

If set, the data source will use a predefined transport and/or schema. The supported values are: "odata" which supports the OData v.2 protocol "odata-v4" which partially supports odata version 4 "signalr"

C#
public DataSourceType? Type { get; set; }

Methods

C#
public void ModelType(Type modelType)
Parameters:modelTypeType
C#
public void Process(DataSourceRequest request, bool processData)
Parameters:requestDataSourceRequestprocessDatabool
C#
protected override void Serialize(IDictionary<string, object> json)
Parameters:jsonIDictionary<string, object>

Overrides: JsonObject.Serialize(IDictionary<string, object>)