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

AggregateFunction from server side

4 Answers 59 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Asaduzzaman
Top achievements
Rank 1
Asaduzzaman asked on 30 Jul 2010, 06:38 AM
I have created gridview column in server side using GridViewMaskedTextBoxColumn,GridViewComboBoxColumn ,GridViewDataColumn and finally added all in gridview.
Now I want to show total and sum of salary according to online example from server side.

Thanks

Azad

4 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 02 Aug 2010, 09:48 AM
Hi Asaduzzaman,

Currently we do not support server-side aggregation.

Regards,
Ross
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
0
Asaduzzaman
Top achievements
Rank 1
answered on 02 Aug 2010, 09:56 AM
Hello, I have solved my problem this way.

 column.AggregateFunctions.Add(new SumFunction() { SourceField = tm.Name, Caption = "Sum: ", ResultFormatString = "{0:c}" });
  column.AggregateFunctions.Add(new AverageFunction() { SourceField = tm.Name, Caption = "Average: ", ResultFormatString = "{0:c}" });
                          
Hope it will help you.........

Thanks
0
Rossen Hristov
Telerik team
answered on 02 Aug 2010, 12:52 PM
Hello Asaduzzaman,

Did you manage to tell the aggregates to be computed on the server and not on the client? Could you share your approach. Thanks.

All the best,
Ross
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
0
Asaduzzaman
Top achievements
Rank 1
answered on 03 Aug 2010, 06:07 AM
yes, I have manage AggregateFunction in server side.My approach is:

first create gridview data column in server side like :  GridViewDataColumn column = new GridViewDataColumn();
then bind data on it : column.DataMemberBinding = new Binding("Salary");
Apply Aggregate function 
 column.AggregateFunctions.Add(new SumFunction() { SourceField = tm.Name, Caption = "Sum: ", ResultFormatString = "{0:c}" });

and finally add it on my gridview

this.gvMain.Columns.Add(column);

Thanks

Azad

Tags
GridView
Asked by
Asaduzzaman
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Asaduzzaman
Top achievements
Rank 1
Share this question
or