This question is locked. New answers and comments are not allowed.
At first I write like this,But it can't solve my problem, column.AggregateFunctions.Add(new AverageFunction |
{ |
FunctionName = "DisplayAverageFunction", |
Caption = "Average: ", |
ResultFormatString = "{0:n}", |
SourceField = FilterSourceField(column.Header.ToString()) where value.Row%2==0 |
}); And I write another code,it still can't solve my problem |
var avg = new AggregateFunction<student, double>
{
AggregationExpression = myItem =>myItem.Where(i => i.age>=20 && i.row%2==0)
};
((GridViewDataColumn)this.RgvVerify.Columns[0]).AggregateFunctions.Add(avg);
{
AggregationExpression = myItem =>myItem.Where(i => i.age>=20 && i.row%2==0)
};
((GridViewDataColumn)this.RgvVerify.Columns[0]).AggregateFunctions.Add(avg);