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

推荐订阅源

V2EX - 技术
V2EX - 技术
博客园 - Franky
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
MongoDB | Blog
MongoDB | Blog
C
Check Point Blog
P
Proofpoint News Feed
雷峰网
雷峰网
F
Fortinet All Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
H
Help Net Security
T
Tailwind CSS Blog
博客园 - 聂微东
博客园 - 【当耐特】
S
Schneier on Security
The Hacker News
The Hacker News
I
Intezer
博客园 - 三生石上(FineUI控件)
量子位
AWS News Blog
AWS News Blog
T
The Exploit Database - CXSecurity.com
腾讯CDC
Hugging Face - Blog
Hugging Face - Blog
P
Palo Alto Networks Blog
P
Privacy International News Feed
V
Vulnerabilities – Threatpost
NISL@THU
NISL@THU
宝玉的分享
宝玉的分享
Cyberwarzone
Cyberwarzone
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
T
Threat Research - Cisco Blogs
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog
T
The Blog of Author Tim Ferriss
Security Latest
Security Latest
H
Hacker News: Front Page
Vercel News
Vercel News
A
Arctic Wolf
L
LINUX DO - 热门话题
G
GRAHAM CLULEY
Simon Willison's Weblog
Simon Willison's Weblog
Google Online Security Blog
Google Online Security Blog
W
WeLiveSecurity
Scott Helme
Scott Helme
Hacker News - Newest:
Hacker News - Newest: "LLM"
O
OpenAI News
TaoSecurity Blog
TaoSecurity Blog
Jina AI
Jina AI
爱范儿
爱范儿

博客园 - 冷火

Lucene.Net学习 Argotic Syndication Framework生成RSS - 冷火 Confirm GridView Deletes with the ModalPopupExtender 如何在C#中实现图片缩放 [ASP.NET] 限制上传文件类型的两种方法 asp.net采集 在C#怎用一条正则表达式验证用逗号隔开的email地址 关于LumiSoft.Net.POP3.Client接收邮件例子(包括附件) dhtmlXTreeprofessional asp.net导出xml文件 - 冷火 - 博客园 DateDiff GridView控件修改、删除示例(修改含有DropDownList控件) - 冷火 - 博客园 局域网QQ第三版(V1.4) asp.net+JSON+AJAX(基于prototype1.4)做无刷新的2级DropDownList - 冷火 - 博客园 非常好的菜单效果(Accordion风格) 静功解决失眠的问题 ASP.NET中文验证码详解 log4net Config Examples 对XAML进行编辑的辅助类(XamlHelper)
Datagridview下一行下一行
冷火 · 2009-03-29 · via 博客园 - 冷火

private void bntNext_Click(object sender, EventArgs e)
        {
            if (dataGridView1.Rows.Count > 0)
            {
                if (dataGridView1.CurrentCell.RowIndex != dataGridView1.Rows.Count - 1)
                {
                    int last = dataGridView1.CurrentRow.Index;
                    dataGridView1.CurrentCell = dataGridView1.Rows[last + 1].Cells[0];
                }
                else
                {
                    dataGridView1.CurrentCell = dataGridView1.Rows[0].Cells[0];
                }
            }
        }

        private void btnPre_Click(object sender, EventArgs e)
        {
            try
            {
                if (dataGridView1.CurrentCell.RowIndex != 0)
                {
                    int last = dataGridView1.CurrentRow.Index;
                    dataGridView1.CurrentCell = dataGridView1.Rows[last - 1].Cells[0];
                }
                else
                {
                    dataGridView1.CurrentCell = dataGridView1.Rows[dataGridView1.Rows.Count - 1].Cells[0];
                }
            }
            catch { }
        }