datagridview 的一些使用小技巧
来源:互联网 发布:win10下安装linux 编辑:程序博客网 时间:2024/06/05 04:36
在DataGridView中获得DataGridViewCheckBoxColumn的状态
当我们选中该Cell后,第1时间得到的该值为:
dgView1.Rows(i).Cells(1).Value = False
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
//MessageBox.Show(dataGridView1.Columns[e.ColumnIndex].CellTemplate.ToString());
if (dataGridView1.RowCount > 0 && e.RowIndex > -1)
{
string action = dataGridView1.Columns[e.ColumnIndex].Name;
if (action == "BtnDel")
{
string ID = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
MessageBox.Show(ID);
}
if (action == "isUse")
{
string value = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
MessageBox.Show(value);
}
}
}
if (MessageBox.Show("确定删除吗?", "提示", MessageBoxButtons.YesNo) == DialogResult.No)
{
return;
}
- datagridview 的一些使用小技巧
- datagridview的一些小技巧
- DataGridView的一些小技巧
- datagridview的使用及小技巧
- DataGridView的一些技巧
- DataGridView的一些技巧
- DataGridView的一些技巧
- DataGridView的一些技巧
- DataGridView的一些技巧
- DataGridView的一些技巧
- DataGridView的一些技巧
- DataGridView的一些技巧
- DataGridView的一些技巧
- DataGridView的一些技巧
- DataGridView的一些技巧
- 使用的一些小技巧
- datagridview的一些技巧转
- winform DataGridView的一些技巧
- .net URL地址中的参数 传递汉字被截断问题解决
- DB2知识集锦
- Delphi 中 FindWindow 和 FindWindowEx 的语法和用法
- html表格边线显示
- Google第一季度收购10家公司 斥资2.68亿美元
- datagridview 的一些使用小技巧
- hibernate 延迟加载
- template多态用法小议
- DB2出现错误导致定时代理不能运行是怎么回事?
- 如何高效删除Oracle数据库中的重复数据
- VC++调试用几个宏
- 4.25 Text
- 梦呓石门
- list的sort和loop比较