使用DataGridViewCheckboxCell在DataGridView中禁用复选框 [英] True disable of a check box in a DataGridView using DataGridViewCheckboxCell

查看:477
本文介绍了使用DataGridViewCheckboxCell在DataGridView中禁用复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道使用DataGridViewCheckboxCell禁用DataGridView中的复选框吗?



我可以使其成为只读,并设置背景颜色,但我无法让复选框本身显示为禁用。任何想法?

解决方案

Guess 你必须自己画画这里是使用相同技术禁用按钮的Microsoft代码示例。 / p>

Does anyone know of a way to disable a checkbox in a DataGridView using a DataGridViewCheckboxCell?

I can make it read only, and set the background color, but I can’t get the checkbox itself to appear disabled. Any thoughts?

解决方案

Guess you have to paint by yourself. Here is Microsoft's code sample for disabling buttons using the same technology.

这篇关于使用DataGridViewCheckboxCell在DataGridView中禁用复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆