dataGridView 移行
来源:互联网 发布:管家婆软件福州经销商 编辑:程序博客网 时间:2024/06/12 22:47
//下移一行
private void button2_Click( object sender, EventArgs e )
{
DataGridViewRow dr = dataGridView1.CurrentRow;
if ( dr.Index < dataGridView1.Rows.Count - 1 )
{
int index = dr.Index;
dataGridView1.Rows.Remove( dr );
dataGridView1.Rows.Insert( index + 1, dr );
dr.Selected = true;
dataGridView1.CurrentCell = dr.Cells[0];
}
}
//上移一行
private void button3_Click( object sender, EventArgs e )
{
DataGridViewRow dr = dataGridView1.CurrentRow;
if ( dr.Index > 0 )
{
int index = dr.Index;
dataGridView1.Rows.Remove( dr );
dataGridView1.Rows.Insert( index - 1, dr );
dr.Selected = true;
dataGridView1.CurrentCell = dr.Cells[0];
}
}
//首行
private void button4_Click( object sender, EventArgs e )
{
if ( dataGridView1.CurrentRow.Index != 0 )
{
DataGridViewRow dr = dataGridView1.CurrentRow;
dataGridView1.Rows.Remove( dr );
dataGridView1.Rows.Insert(0, dr );
dr.Selected = true;
dataGridView1.CurrentCell = dr.Cells[0];
}
}
//末行
private void button5_Click( object sender, EventArgs e )
{
if ( dataGridView1.CurrentRow.Index <dataGridView1.Rows.Count-1 )
{
DataGridViewRow dr = dataGridView1.CurrentRow;
dataGridView1.Rows.Remove( dr );
dataGridView1.Rows.Insert( dataGridView1.Rows.Count , dr );
dr.Selected = true;
dataGridView1.CurrentCell = dr.Cells[0];
}
}
- dataGridView 移行
- 移行短信需求
- 英语单词移行有一定规则
- vsflexgrid 上移、下移行的代码
- Bank相关1_数据移行
- Datagridview
- DataGridView
- DataGridView
- DataGridView
- DATAGRIDVIEW
- DataGridView
- DataGridView
- datagridview
- DataGridView
- dataGridView
- datagridview
- DataGridView
- datagridview
- oracle忘记sys密码解决方法
- 23444444444444444444444444444444
- Win7宝典 / Windows7宝典
- MessageBox
- 代理模式 -远程代理 ProxyPattern
- dataGridView 移行
- 10 11 14 逛sh
- orge学习资源
- iPhone 制作lib 分享
- 10 11 15 出差了
- sdfsdfsdfsdfsdfffffffffffffffffff
- 代理模式 -保护代理 ProxyPattern
- 10 11 16 出状况了
- oracle笔记一(sql语句方面)