您现在的位置是:网站首页> 编程资料编程资料
实现DataGridView控件中CheckBox列的使用实例_实用技巧_
2023-05-24
278人已围观
简介 实现DataGridView控件中CheckBox列的使用实例_实用技巧_
复制代码 代码如下:
///
/// 实现DataGridView控件中CheckBox列的使用
///
///
///
private void dgvTradList_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 0 && e.RowIndex != -1)
{
if ((bool)dgvTradList.Rows[e.RowIndex].Cells[0].EditedFormattedValue == true)
{
dgvTradList.Rows[e.RowIndex].Cells[0].Value = false;
}
else
{
dgvTradList.Rows[e.RowIndex].Cells[0].Value = true;
}
}
您可能感兴趣的文章:
相关内容
- php使用socket编程示例_实用技巧_
- asp.net利用存储过程实现模糊查询示例分享_实用技巧_
- .NET操作Excel实例分享_实用技巧_
- aspx中的mysql操作类sqldatasource使用示例分享_实用技巧_
- .NET的file文件上传控件使用方法 修改web.config文件上传大文件_实用技巧_
- asp.net弹出窗口 返回值_实用技巧_
- Repeater事件OnItemCommand取得行内控件的方法_实用技巧_
- 利用sender的Parent获取GridView中的当前行(获取gridview的值)_实用技巧_
- asp.net2.0中css失效的解决方法_实用技巧_
- gridview自动排序示例分享_实用技巧_
