protected void ASPxGridView1_CustomSummaryCalculate(object sender, DevExpress.Data.CustomSummaryEventArgs e)
{
int totalSum = ;
// Initialization.
//if (e.SummaryProcess == DevExpress.Data.CustomSummaryProcess.Start)
totalSum = ;
// Calculation.
//if (e.SummaryProcess == DevExpress.Data.CustomSummaryProcess.Calculate)
if(((ASPxPageControl)grid.FindDetailRowTemplateControl(Eindex, "ASPxPageControl1"))==null)return;
for (int i = ; i < ((ASPxGridView)((ASPxPageControl)grid.FindDetailRowTemplateControl(Eindex, "ASPxPageControl1")).FindControl("ASP          xGridView1")).VisibleRowCount; i++)
{
if (Convert.ToString(((ASPxGridView)((ASPxPageControl)grid.FindDetailRowTemplateControl(Eindex, "ASPxPageControl1")).FindControl                ("ASPxGridView1")).GetRowValues(i, new string[] { "XXX" })) == "False")
totalSum += Convert.ToInt32(((ASPxGridView)((ASPxPageControl)grid.FindDetailRowTemplateControl(Eindex, "ASPxPageControl1")).              FindControl("ASPxGridView1")).GetRowValues(i, new string[] { "YYYY" }));
}
// Finalization.
//if (e.SummaryProcess == DevExpress.Data.CustomSummaryProcess.Finalize)
e.TotalValue = totalSum;
} protected void grid_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e)
{
//if (e.Expanded) //判断是否是点击展开
//{
// flag = true;
Eindex = e.VisibleIndex;
//}
}

Aspxgridview 根据条件来自定义计算Totalsummery的更多相关文章

  1. 最好的Kubernetes客户端Java库fabric8io,快来自定义你的操作

    我最新最全的文章都在南瓜慢说 www.pkslow.com,欢迎大家来喝茶! 1 Kubernetes Java客户端 对于Kubernetes集群的操作,官方提供了命令行工具kubectl,这也是我 ...

  2. SSAS:菜鸟笔记(二)定义计算(DMX脚本)

    基本概念 Calculation可以定义计算成员.名称集以及执行其他脚本命令来扩展分析服务立方(Analysis Service Cube)的功能. Calculation包含MDX以及脚本两个部分: ...

  3. ASP.NET WebApi通过自定义ControllerSelector来自定义Controller的选择

    在web api中,我们可以通过给Cotroller类添加RoutePrefixAttribute来定义url与Controller之间的映射,但是有时候有一些特殊情况下,我们需要做一些特殊处理来将某 ...

  4. 使用 antd 的 form 组件来自定义提交的数据格式

    最近使用antd UI 的表单提交数据,数据里面有的是数组,有的是对象.提交的时候还要去校验参数,让人非常头疼.在我仔细看完文档之后,发现 antd 的 form 组件做的非常不错,这些需求通通不是问 ...

  5. Verilog定义计算位宽的函数clogb2

    在很多情况下要计算输入输出的位宽,比如你写一个8*8的ram,那么地址需要三位去表示,那么这个函数的方便就体现出来了,你需要使用函数定义就好了,如果对于多文件可以包含定义的文件: 如果你的DEPTH是 ...

  6. Spring 梳理-profile与条件化定义bean

    定义profile <beans> //root <beans profile="dev"> <bean id=.../> </beans ...

  7. 通过jquery来实现文本框和下拉框动态添加效果,能根据自己的需求来自定义最多允许添加数量,实用的jquery动态添加文本框特效

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  8. 通过web.config来自定义output caching缓存

    我们服务器有开启缓存功能, 缓存功能可以减少您访问网站时候网站在服务器里面的编译时间, 大大加快您网站的访问速度, 如果您需要对您网站进行频繁更新的话, 您可以考虑暂时将缓存时间减少,或者暂时关闭缓存 ...

  9. 12月16日 增加一个购物车内product数量的功能, 自定义method,在helper中定义,计算代码Refactor到Model中。

    仿照Rails实战:购物网站 教材:5-6 step5:计算总价,做出在nav上显示购物车内product的数量. 遇到的❌: 1. <% sum = 0 %> <% current ...

随机推荐

  1. POJ3621:Sightseeing Cows——题解

    http://poj.org/problem?id=3621 全文翻译参自洛谷:https://www.luogu.org/problemnew/show/P2868 题目大意:一个有向图,每个点都有 ...

  2. POJ3254:Corn Fields——题解

    http://poj.org/problem?id=3254 题面来自洛谷:https://www.luogu.org/problemnew/show/1879 农场主John新买了一块长方形的新牧场 ...

  3. Educational Codeforces Round 39 (Rated for Div. 2) G

    Educational Codeforces Round 39 (Rated for Div. 2) G 题意: 给一个序列\(a_i(1 <= a_i <= 10^{9}),2 < ...

  4. 洛谷 P3119 [USACO15JAN]草鉴定Grass Cownoisseur 解题报告

    P3119 [USACO15JAN]草鉴定Grass Cownoisseur 题目描述 约翰有\(n\)块草场,编号1到\(n\),这些草场由若干条单行道相连.奶牛贝西是美味牧草的鉴赏家,她想到达尽可 ...

  5. How Many Nines ZOJ - 3950 打表大法好

    If we represent a date in the format YYYY-MM-DD (for example, 2017-04-09), do you know how many 9s w ...

  6. Ultra-QuickSort POJ - 2299 树状数组求逆序对

    In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a seque ...

  7. Qt error ------ 出现Error - RtlWerpReportException failed with status code :-1073741823. Will try to launch the process directly

    出现原因: 使用了不存在的对象 数组越界了 用 delete 释放未分配的内存空间,或者超过一次释放同个内存 比如: 顺序不能颠倒 正确: ui->setupUi(this); ui->t ...

  8. 杭电多校第八场-A-Character Encoding

    题目描述 In computer science, a character is a letter, a digit, a punctuation mark or some other similar ...

  9. UVA 10214 Trees in a Wood

    https://vjudge.net/problem/UVA-10214 题意:你站在原点,每个坐标位置有一棵高度相同的树,问能看到多少棵树 ans=Σ gcd(x,y)=1 欧拉函数搞搞 #incl ...

  10. Jmeter-分布式

    转载自: http://www.51testing.com/html/28/116228-247521.html 由于Jmeter本身的瓶颈,当需要模拟数以千计的并发用户时,使用单台机器模拟所有的并发 ...