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

推荐订阅源

T
The Blog of Author Tim Ferriss
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
大猫的无限游戏
大猫的无限游戏
月光博客
月光博客
博客园 - Franky
博客园 - 三生石上(FineUI控件)
爱范儿
爱范儿
腾讯CDC
罗磊的独立博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tailwind CSS Blog
P
Privacy International News Feed
The Cloudflare Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Threat Research - Cisco Blogs
Hugging Face - Blog
Hugging Face - Blog
Project Zero
Project Zero
S
SegmentFault 最新的问题
美团技术团队
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
云风的 BLOG
云风的 BLOG
Spread Privacy
Spread Privacy
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
B
Blog
Cisco Talos Blog
Cisco Talos Blog
The GitHub Blog
The GitHub Blog
G
Google Developers Blog
T
The Exploit Database - CXSecurity.com
Simon Willison's Weblog
Simon Willison's Weblog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Cisco Blogs
NISL@THU
NISL@THU
J
Java Code Geeks
C
CERT Recently Published Vulnerability Notes
T
Tor Project blog
K
Kaspersky official blog
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
I
Intezer
U
Unit 42
博客园 - 聂微东
C
Check Point Blog
Recent Announcements
Recent Announcements
Microsoft Azure Blog
Microsoft Azure Blog
Latest news
Latest news
博客园 - 司徒正美
G
GRAHAM CLULEY
S
Schneier on Security
V
Visual Studio Blog

博客园 - 夜飞

滚动DATAGRID数据 和股票一样滚动 vs.2005 中对COOKIES 加密解密 例子 - 夜飞 asp.net(c#) datelist DataGrid 中截取字符串加"..." 和 鼠标放上去字符全部显示 - 夜飞 vs.2005 比较时间大小 可精确到秒 - 夜飞 VS.2005 子窗体提交数据刷新父窗体 GRIDVIEW 子窗体(2) VS.2005 子窗体提交数据刷新父窗体 GRIDVIEW 父窗体(1) - 夜飞 gridview中加弹出窗口用例 创建数据库连接对象 ASP.NET程序员笔试最常见问题 海量数据库的查询优化及分页算法方案 表格列头加菜单(datagrid) 实现无刷新DropdownList联动效果 实现的不让同一个用户登陆 GridView控件修改、删除示例(修改含有DropDownList控件) asp.net打印 Web打印控制技术的几种方案: ASP.NET中弹出窗口技术 在asp.net中读取XML文件信息的4种方法 Asp.Net 动态生成验证码
----- 把DataGrid1的一列的统计显示在页脚
夜飞 · 2006-07-07 · via 博客园 - 夜飞

-----  把DataGrid1的一列的和显示在页脚 -------
private int sum=0;
  private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
  {
    
   if (e.Item.ItemIndex>=0)
   {
    sum+=int.Parse(e.Item.Cells[3].Text);
  
  
   }
   else if(e.Item.ItemType==ListItemType.Footer)
   {
   e.Item.Cells[0].Text="总和为:";
    e.Item.Cells[1].Text=sum.ToString();
    e.Item.Cells[2].Text="平均值为";
    e.Item.Cells[3].Text=((int)(sum/DataGrid1.Items.Count)).ToString();
   
    }

 }