(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();
这种实现很牵强,总感觉很不妥,希望各位看到的朋友,不吝笔墨留言指点赐教,多谢。
前几天一个朋友和我讨论,如何实现在行标题添加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();
这种实现很牵强,总感觉很不妥,希望各位看到的朋友,不吝笔墨留言指点赐教,多谢。
相关文章推荐
- WinForm DataGrid 中在 DataGridBoolColumn 的列标题上加一个 CheckBox 实现全选和全不选
- winform中DataGridBoolColumn呈灰色?
- Android实现自定义位置无标题Dialog
- winform中datagrid和datagridview设置列标题的实现
- Silverlight控件DataGrid自定义模板(DataGridTextColumn.ElementStyle)实现居中对齐等复杂界面
- DataGrid 简单自定义表头插入CheckBox实现全选/全不选
- [WinForm ADO.NET实现TaskVision][SQL Server 2008][winform datagridview总结][自定义Custom控件]Winform DataGridView各种现有column及自定义column+Winform自定义控件
- 原创 c# 封装的带CheckBox的DataGridViewColumnHeaderCell 源码部分 实现DataGridView列头带CheckBox控件实现全选功能,支持列头带标题
- Silverlight控件DataGrid自定义模板(DataGridTextColumn.ElementStyle)实现居中对齐等复杂界面
- easyui扩展datagrid-groupview实现支持全选及点击标题收缩
- WPF中的DataGridTemplateColumn实现点击列标题排序
- flex DataGrid 标题上放 CheckBox 实现全选
- winform中datagrid和datagridview设置列标题的实现
- 关于Winform下DataGridView中实现checkbox全选反选、同步列表项的处理
- 实现HorizontalScrollView中的标题滑动时始终处于中间位置
- Silverlight 2 DataGrid 如何自定义列标题
- C#设置WinForm中DataGrid列的方法(列宽/列标题等)
- Winform分页控件支持表头全选操作实现
- ASP.NET中利用DataGrid的自定义分页功能和存储过程结合实现高效分页
- (C#)DataGrid实现自定义分页,鼠标移至变色,删除确认、可编辑,可删除