This is a migrated thread and some comments may be shown as answers.

[Solved] Custom AggregateFunction Example SumFunction

1 Answer 151 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sven
Top achievements
Rank 1
Sven asked on 25 Oct 2010, 11:44 AM
Hi there,

I would like to write a custom AggregateFunction to aggregate some objects I recieve from a web service.

Unfortunately I couldnt find examples in the documentation or on the net.

Is it possible to paste the source code of the class: Telerik.Windows.Data.SumFunction ???

This class is doing exactly what i want, but can only handle numbers and not custom objects. For example e.g.: Person

Best regards,
Sven

1 Answer, 1 is accepted

Sort by
0
Accepted
Pavel Pavlov
Telerik team
answered on 25 Oct 2010, 11:50 AM
Hi Sven,

The attached sample demonstrates an easy way to implement a custom aggregate function .
Within "MyAggregateMethod" you have access to the collection of your business objects and you can perform any custom aggregation logic over it.

Kind regards,
Pavel Pavlov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Sven
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or