标签:cto 数据源 tail summary default idc 汇总 top efault
今天碰到有同事遇到这个方面的需求,贴一下吧。
private void gvTop_CustomSummaryCalculate(object sender, CustomSummaryEventArgs e)
{
if (e.IsTotalSummary && e.SummaryProcess == CustomSummaryProcess.Finalize)
{
// 数据源
var data = this.gcTop.DataSource as List<StockOrderDetail_V>;
// 统计项
var item = e.Item as GridColumnSummaryItem;
switch (item.FieldName)
{
case "FACTAMT":
data = data.FindAll(x => x.IsChecked == 1);
e.TotalValue = data.Sum(x => x.FACTAMT);
break;
default:
break;
}
}
}
DevExpress中GridControl自定义汇总列值(有选择性的汇总)
标签:cto 数据源 tail summary default idc 汇总 top efault
原文地址:http://www.cnblogs.com/geping/p/7182044.html