C#如何禁用Windows 窗体 DataGridView 控件的按钮列中的按钮

上传:thiefmao_cuc 浏览: 33 推荐: 0 文件:RAR 大小:42KB 上传时间:2019-05-28 08:18:13 版权申诉
代码示例演示如何自定义DataGridViewButtonCell类来显示可以显示为禁用的按钮。本示例定义一个新的单元格类型DataGridViewDisableButtonCell,它由DataGridViewButtonCell派生。此单元格类型提供一个新的Enabled属性,可以将该属性设置为false来在单元格中绘制禁用的按钮。本示例还定义一个新的列类型DataGridViewDisableButtonColumn,它显示DataGridViewDisableButtonCell对象。为了演示此新单元格类型和列类型,父DataGridView中的每个DataGridViewCheckBoxCell的当前值确定同一
上传资源
用户评论