您的位置:首页 > 其它

(Winform) DataGrid中自定义boolColumn列,在列标题位置实现全选.

2005-12-20 16:32 531 查看
接上篇随笔"在Winform的DataGrid添加CheckBox列" http://snowlove67.cnblogs.com/archive/2005/11/23/282737.html

前几天一个朋友和我讨论,如何实现在行标题添加CheckBox列,实现全选功能,想了想这个应该是很常见的功能,// CheckBox which is defined as boolColumn header
2 private CheckBox chkSelectAll = null;
3 private void AddHeaderForSelectAll()
7 private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
7
private void SelectAllRows(bool bSelect)
this.dataGrid1.DataSource = dtTemp.DefaultView;
AddHeaderForSelectAll();

这种实现很牵强,总感觉很不妥,希望各位看到的朋友,不吝笔墨留言指点赐教,多谢。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐