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

推荐订阅源

博客园 - 叶小钗
D
Docker
GbyAI
GbyAI
Y
Y Combinator Blog
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Stack Overflow Blog
Stack Overflow Blog
WordPress大学
WordPress大学
小众软件
小众软件
Engineering at Meta
Engineering at Meta
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
B
Blog
H
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security Blog

博客园 - 玄新

asp.net 2.0 中加密web.config 文件中的配置节 Windows DNA架构 如何使用 Visual C# .NET 检查 Windows 版本[转] 使用DirectoryServices给文件添加访问权限 - 玄新 - 博客园 使用WMI来获取CPU序列号 - 玄新 - 博客园 什么是WMI C#读取设备信息(源代码下载) 格式化日期型数据 用 javascript显示时间日期代码(来自网上) - 玄新 - 博客园 昨天发现System.Diagnostics.Process 一样的可以打开一个网页的,直接的输入网页的地址就好了 - 玄新 - 博客园 文本框输入限制大全 在b/s开发中经常用到的javaScript技术 文本框里只能输入数字和退格键 DataGridView新特色(vs2005) 实现窗体淡入淡出的完整代码 excel 导入导出access数据库(winform) 递归得到叶子节点。 验证手机号码,小灵通号码函数 如何在SQL中对行进行动态编号
(datagridview)如果单击列表头,全选.(第一列为复选框)
玄新 · 2007-01-30 · via 博客园 - 玄新

private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1   )//如果单击列表头,全选.
            {
                int i;
                for (i = 0; i < this.dataGridView1.RowCount; i++)
                {
                    this.dataGridView1.EndEdit();//结束编辑状态.
                    string re_value = this.dataGridView1.Rows[i].Cells[0].EditedFormattedValue.ToString();
                    this.dataGridView1.Rows[i].Cells[0].Value   = "true";//如果为true则为选中,false未选中
                    this.dataGridView1.Rows[i].Selected = true;//选中整行。
                 
                }  
            }
        }