New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
get_aggregates()
This property returs a collection of Aggregate objects. Generally used when there is a need to access the aggregate expressionson the client. The example below demonstrates how to manipulating the aggregates of the RadClientDataSource control byusing the properties of the Aggregate collection.
ASPNET
<script type="text/javascript">
function applyAggregate() {
var aggregate = new Telerik.Web.UI.ClientDataSource.Aggregate();
var aggregateFunction = new Telerik.Web.UI.ClientDataSource.AggregateFunction();
aggregate.set_field("UnitPrice");
aggregate.set_aggregate(aggregateFunction.Max);
dataSource.get_aggregates().add(aggregate);
}
</script>
<telerik:radclientdatasource runat="server" id="RadClientDataSource1">
</telerik:radclientdatasource>
ASPNET
<script type="text/javascript">
function applyAggregate() {
dataSource.get_aggregates().add({ field: "UnitPrice", aggregate: "max" });
}
</script>
<telerik:radclientdatasource runat="server" id="RadClientDataSource2">
</telerik:radclientdatasource>