New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

ClientDataSource Object

This help article describes the strongly typed client-side objects of the RadClientDataSource control.

Aggregate

Telerik.Web.UI.ClientDataSource.Aggregate – represents an aggregate setting on the client. The following table describes the properties that Aggregate object exposes.

PropertyParameterDescription
get_field()noneReturns the data field of the aggregate.
set_field()stringSets the data field of the aggregate.
get_aggregate()noneReturns the aggregate function of the aggregate.
set_aggregate()Telerik.Web.UI.ClientDataSource.AggregateFunctionSets the aggregate function of the aggregate.

Telerik.Web.UI.ClientDataSource.AggregateCollection – holds a collection of Telerik.Web.UI.ClientDataSource.Aggregate settings.

Filtering

Telerik.Web.UI.ClientDataSource.FilterEntry – represents a filter setting on the client. The following table describes the properties that FilterEntry object exposes.

PropertyParameterDescription
get_fieldName()noneGets the name of the field from the dataSource which will be used in the filter entry.
set_fieldName()stringSets the name of the field from the dataSource which will be used in the filter entry.
get_operator()noneGets the filter operator used in the filtering. Enumeration contains: EqualTo , NotEqualTo , GreaterThan , GreaterThanOrEqualTo , LessThan , LessThenOrEqualTo , Contains , EndsWith , StartsWith .
set_operator()Telerik.Web.UI.ClientDataSource.FilterOperatorSets the filtering operator.
get_value()Telerik.Web.UI.ClientDataSource.FilterOperatorGets the filter value of the current filter entry.
set_value()stringSets the filter value of the current filter entry.

Telerik.Web.UI.ClientDataSource.FilterExpression – represents a client-side strongly types object which holds a collection of FilterEntries or other FilterExpressions and an additional property defining the logic operatorused between the filter entries. The object exposes the following properties.

PropertyParameterDescription
get_logicOperator()noneGets the current logic operator used between the filter entries of the filter expression. Default is AND .
set_logicOperator()noneSets the logic operator used between the filter entries of the filter expression.

Grouping

Telerik.Web.UI.ClientDataSource.GroupExpression – represents a cient-side strongly types setting describing on group expressionin the RadClientDataSource. The following table describes the properties that GroupExpression object exposes.

PropertyParameterDescription
get_fieldName()noneGets the name of the field from the dataSource which will be used in the grouping operation.
set_fieldName()stringSets the name of the field from the dataSource which will be used in the grouping operation.
get_aggregates()noneGets the aggregates settings for the current group.
get_sortOrder()noneGets the sort order for the current group.
set_sortOrder()Telerik.Web.UI.ClientDataSource.SortOrderSets the sort order for the current group.

Telerik.Web.UI.ClientDataSource.SortExpressionCollection – holds a collection of Telerik.Web.UI.ClientDataSource.SortExpression settings.

Sorting

Telerik.Web.UI.ClientDataSource.SortExpression – represents a setting defining one sort expression in the RadClientDataSource. The following table describes the properties that SortExpression object exposes.

PropertyParameterDescription
get_fieldName()noneGets the name of the field from the dataSource which will be used in the sorting operation.
set_fieldName()stringSets the name of the field from the dataSource which will be used in the sorting operation.
get_sortOrder()noneGets the sort order. Default is ASC .
set_sortOrder()Telerik.Web.UI.ClientDataSource.SortOrderSets the sort order when used in sorting.

Telerik.Web.UI.ClientDataSource.SortExpressionCollection – holds a collection of Telerik.Web.UI.ClientDataSource.SortExpression settings.

Common properties for all collections.

All of the above collections share the same common properties inherited from Telerik.Web.UI.ClientDataSource.CollectionBase. You can find a definition of each property in the following table.

PropertyParameterDescription
add()itemAppends an item at the end of the collection.
add()index, itemInserts an item at the specified index.
remove()itemRemoves an item from the collection.
clear()noneClears all items in the collection.
toList()noneReturn a JavaScript array holding all the items in the collection.
get_count()noneGets the total number of items in the collection.
getItem()indexGets an item at the specified index.
indexOf ()itemGets the index of the specified item.
forEach()labmda functionApplies the lambda function to each item in the collection.

See Also