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

推荐订阅源

美团技术团队
D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Check Point Blog
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
IT之家
IT之家
月光博客
月光博客
U
Unit 42
K
Kaspersky official blog
T
Threatpost
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
GbyAI
GbyAI
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
Engineering at Meta
Engineering at Meta
Recorded Future
Recorded Future
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security @ Cisco Blogs
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
Security Archives - TechRepublic
Security Archives - TechRepublic
Webroot Blog
Webroot Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Schneier on Security
S
Secure Thoughts
The Register - Security
The Register - Security
B
Blog RSS Feed
The Last Watchdog
The Last Watchdog
P
Palo Alto Networks Blog
爱范儿
爱范儿
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 热门话题
C
Cisco Blogs
Spread Privacy
Spread Privacy
F
Full Disclosure
博客园 - 聂微东
T
The Blog of Author Tim Ferriss

博客园 - 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;