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

DataSourceAggregatesFactory

Methods

Min()

Applies the Min aggregate function.

Example


            .DataSource(dataSource => dataSource
                    .Custom()
                    .Aggregates(aggregates =>
                    {
                        aggregates.Add(p => p.UnitsInStock).Min();
                    })
            )

Max()

Applies the Max aggregate function.

Example


            .DataSource(dataSource => dataSource
                    .Custom()
                    .Aggregates(aggregates =>
                    {
                        aggregates.Add(p => p.UnitsInStock).Max();
                    })
            )

Count()

Applies the Count aggregate function.

Example


            .DataSource(dataSource => dataSource
                    .Custom()
                    .Aggregates(aggregates =>
                    {
                        aggregates.Add(p => p.UnitsInStock).Count();
                    })
            )

Average()

Applies the Average aggregate function.

Example


            .DataSource(dataSource => dataSource
                    .Custom()
                    .Aggregates(aggregates =>
                    {
                        aggregates.Add(p => p.UnitsInStock).Average();
                    })
            )

Sum()

Applies the Sum aggregate function.

Example


            .DataSource(dataSource => dataSource
                    .Custom()
                    .Aggregates(aggregates =>
                    {
                        aggregates.Add(p => p.UnitsInStock).Sum();
                    })
            )

In this article
Not finding the help you need?