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

推荐订阅源

博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
S
SegmentFault 最新的问题
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
美团技术团队
爱范儿
爱范儿
博客园 - 三生石上(FineUI控件)
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
DataBreaches.Net
F
Fortinet All Blogs
TaoSecurity Blog
TaoSecurity Blog
D
Docker
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
宝玉的分享
宝玉的分享
腾讯CDC
Google Online Security Blog
Google Online Security Blog
Recorded Future
Recorded Future
T
The Exploit Database - CXSecurity.com
T
The Blog of Author Tim Ferriss
V
V2EX
S
Securelist
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
CERT Recently Published Vulnerability Notes
A
Arctic Wolf
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
Y
Y Combinator Blog
P
Proofpoint News Feed
T
Tor Project blog
AWS News Blog
AWS News Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
博客园 - 聂微东
T
Threat Research - Cisco Blogs
B
Blog
Attack and Defense Labs
Attack and Defense Labs
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
阮一峰的网络日志
阮一峰的网络日志
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
N
News and Events Feed by Topic
博客园 - 司徒正美
H
Help Net Security
C
Cisco Blogs
C
Check Point Blog
S
Secure Thoughts

博客园 - AGPSky

资源文件配置和使用 操作App.config与Web.config文件 正则表达式30分钟入门教程(第二版) C#命名规则、开发习惯和风格 Linq to SQL vs2005和vs2008默认建立web site和web application 生成的webform源码的一点区别 - AGPSky 安装VS2005 SP1时失败(错误 1718。文件被数字签名策略拒绝) 利用DAAB 获取存储过程返回值的方法 - AGPSky - 博客园 【转】理解委托与事件的好文章 【转】C#委托,事件理解入门 (译稿) 【转】C# 中的委托和事件 【转】浅析C#的事件处理和自定义事件[object sender , EventArgs e] [转】object sender,EventArgs e的一些讲解 js的prototype的例子三 js的prototype的例子二 js的prototype的例子一 把控件动态添加到页面中 petshop4.0网上资料 Webdiyer的分页控件+通用存储过程+查询+ajax分页
gridview 增加行,进行数据汇总 - AGPSky - 博客园
AGPSky · 2007-12-28 · via 博客园 - AGPSky

DataRow dr = table1.NewRow();
          
//1是把所有列进行汇总
           
//for (int i = 1; i < table1.Columns.Count; i++)
           
// {
               
// dr = table1.Compute("Sum(" + table1.Columns.ColumnName + ")", "true");   
            
//}


           
//仅对需要的列进行汇总
             decimal xxx = 0;
            
decimal xxx1 = 0;
             
for (int i = 1; i < table1.Rows.Count; i++)
             
{
                 
                 xxx  
+= Convert.ToDecimal(table1.Rows["衣服用费"]);
                 dr[
1]=xxx;
                 
                 xxx1 
+= Convert.ToDecimal(table1.Rows["住宿费用"]);
                 dr[
2= xxx1;

            }


            table1.Rows.Add(dr);

            GridView1.DataSource 
= table1;