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

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

问题描述

有谁知道一种方法来使用DataGridViewCheckboxCell?

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

我可以把它只读,并设置背景颜色,但我一个DataGridView禁用复选框不能得到的复选框本身出现禁用。有什么想法?

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天全站免登陆