惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
L
LangChain Blog
U
Unit 42
Apple Machine Learning Research
Apple Machine Learning Research
The Cloudflare Blog
Martin Fowler
Martin Fowler
T
Tenable Blog
IT之家
IT之家
H
Help Net Security
阮一峰的网络日志
阮一峰的网络日志
Forbes - Security
Forbes - Security
N
Netflix TechBlog - Medium
The Hacker News
The Hacker News
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
Tailwind CSS Blog
美团技术团队
NISL@THU
NISL@THU
T
Threatpost
GbyAI
GbyAI
T
Threat Research - Cisco Blogs
I
InfoQ
Jina AI
Jina AI
Microsoft Azure Blog
Microsoft Azure Blog
人人都是产品经理
人人都是产品经理
C
Check Point Blog
V
Vulnerabilities – Threatpost
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Spread Privacy
Spread Privacy
S
Securelist
大猫的无限游戏
大猫的无限游戏
P
Privacy & Cybersecurity Law Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
爱范儿
爱范儿
小众软件
小众软件
C
Cybersecurity and Infrastructure Security Agency CISA
Cisco Talos Blog
Cisco Talos Blog
Engineering at Meta
Engineering at Meta
S
Security Affairs
S
Secure Thoughts
T
Troy Hunt's Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
aimingoo的专栏
aimingoo的专栏
博客园 - 司徒正美
PCI Perspectives
PCI Perspectives
C
Cisco Blogs
MongoDB | Blog
MongoDB | Blog
Vercel News
Vercel News
月光博客
月光博客
Recorded Future
Recorded Future

博客园 - 庆祝

trigger 来源于:鹰翔宇空的文章 动态判断性别选中的问题 用来在表格中换行 JDK的配置 把struts验证框架的模板翻译成了中文 常用的表查询MSSQL语句 利用JavaEE的Validator 可以创建xml的JAVA工厂类--------JAVA Html简单的Head区专业知识 Oracle温习典故 整理的Oracle精辟问答题(8) 整理的Oracle精辟问答题(7) Oracle几个常用的数据字典 ASP.NET把gridview中的数据导入到Excel中 整理的Oracle精辟问答题(6) 整理的Oracle精辟问答题(4) 整理的Oracle精辟问答题(5) 整理的Oracle精辟问答题(3)
ASP.NET的gridview的页脚添加合计字段
庆祝 · 2008-05-01 · via 博客园 - 庆祝

转载于 “编程论坛”
 int totalNumber, iNumber;
 double totalMoney, iMoney;
 protected void GRIDVIEW控件_RowDataBound(object sender, GridViewRowEventArgs e)
 {
    if (e.Row.RowType == DataControlRowType.DataRow || e.Row.RowType == DataControlRowType.EmptyDataRow)
        {
            DataRowView drvBasicCountInfor = (DataRowView)e.Row.DataItem;
            iMoney = Convert.ToDouble(drvBasicCountInfor[6]);//6是第5列的数字
            //生成总计
             totalNumber += iNumber;
             totalMoney += iMoney;
           }
           if (e.Row.RowType == DataControlRowType.Footer)  //页脚
            {
                e.Row.Cells[5].Text = "总计金额";
               e.Row.Cells[6].Text = string.Format("{0}", totalMoney);
            }
}
别忘了 GridView控件showfooter的属性=true呀