Aspxgridview 根据条件来自定义计算Totalsummery

Aspxgridview 根据条件来自定义计算Totalsummery
 1         protected void ASPxGridView1_CustomSummaryCalculate(object sender, DevExpress.Data.CustomSummaryEventArgs e)
 2         {
 3             int totalSum = 0;
 4             // Initialization.
 5             //if (e.SummaryProcess == DevExpress.Data.CustomSummaryProcess.Start)
 6             totalSum = 0;
 7             // Calculation.                      
 8             //if (e.SummaryProcess == DevExpress.Data.CustomSummaryProcess.Calculate)
 9             if(((ASPxPageControl)grid.FindDetailRowTemplateControl(Eindex, "ASPxPageControl1"))==null)return;
10             for (int i = 0; i < ((ASPxGridView)((ASPxPageControl)grid.FindDetailRowTemplateControl(Eindex, "ASPxPageControl1")).FindControl("ASP          xGridView1")).VisibleRowCount; i++)
11             {
12                 if (Convert.ToString(((ASPxGridView)((ASPxPageControl)grid.FindDetailRowTemplateControl(Eindex, "ASPxPageControl1")).FindControl                ("ASPxGridView1")).GetRowValues(i, new string[] { "XXX" })) == "False")
13                     totalSum += Convert.ToInt32(((ASPxGridView)((ASPxPageControl)grid.FindDetailRowTemplateControl(Eindex, "ASPxPageControl1")).              FindControl("ASPxGridView1")).GetRowValues(i, new string[] { "YYYY" }));
14             }
15             // Finalization.
16             //if (e.SummaryProcess == DevExpress.Data.CustomSummaryProcess.Finalize)
17             e.TotalValue = totalSum;
18         }
19 
20         protected void grid_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e)
21         {
22             //if (e.Expanded)    //判断是否是点击展开
23             //{
24             //    flag = true;
25                 Eindex = e.VisibleIndex;
26             //}
27         }
Aspxgridview 根据条件来自定义计算Totalsummery

Aspxgridview 根据条件来自定义计算Totalsummery,布布扣,bubuko.com

Aspxgridview 根据条件来自定义计算Totalsummery

上一篇:Spring MVC 框架搭建及详解


下一篇:NetBSD Make源代码阅读二:链表之创建与销毁