3 Answers, 1 is accepted
0
Bruno
Top achievements
Rank 2
answered on 05 Jul 2010, 10:56 AM
this is Burno
am developing with Telerik controls
can you understand your explaination a bit? am worried about the means
here is my source
http://www.telerik.com/help/aspnet-ajax/grdcolumnaggregates.html
am developing with Telerik controls
can you understand your explaination a bit? am worried about the means
here is my source
http://www.telerik.com/help/aspnet-ajax/grdcolumnaggregates.html
0
w l
Top achievements
Rank 1
answered on 05 Jul 2010, 11:12 AM
| A | B | C | D |
| 1 | 4 | 6 | 7 |
| 2 | 6 | 7 | |
| 3 | 4 | 7 | |
| 3 | 2 | 2 | 3 |
0
Princy
Top achievements
Rank 2
answered on 05 Jul 2010, 11:44 AM
Hello,
You can set the Aggregate property of GridBoundColumn to "Custom" and in OnCustomAggregate event calculate the aggregate set the result. Check out the following code snippet which illustrates same.
ASPX:
C#:
Thanks,
Princy.
You can set the Aggregate property of GridBoundColumn to "Custom" and in OnCustomAggregate event calculate the aggregate set the result. Check out the following code snippet which illustrates same.
ASPX:
| <telerik:GridBoundColumn DataField="LastName" HeaderText="LastName" UniqueName="LastName" Aggregate="Custom" /> |
C#:
| protected void RadGrid1_CustomAggregate(object sender, GridCustomAggregateEventArgs e) |
| { |
| if (((Telerik.Web.UI.GridBoundColumn)e.Column).UniqueName == "LastName") |
| { |
| foreach (GridDataItem item in RadGrid1.MasterTableView.Items) |
| { |
| if (item["LastName"].Text != " ") |
| count++; |
| } |
| e.Result = count; |
| } |
| } |
Thanks,
Princy.