Windows应用程序中DatagridView上的禁用复选框 [英] Diabled check box on DatagridView in windows application

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

问题描述

我试图在datagridview上显示Check or Unchecked AND disable复选框,但无法获得确切的结果.我从基类DataGridViewCheckBoxCell和DataGridViewCheckBoxColumn继承了新类,但无法处理其中的Paint函数.没有在正确的位置上打印复选框.有人可以给我一些更简单的解决方案吗?因为网格由其他带有普通文本的列和带有复选框的五列组成.

I am trying to display Check OR Unchecked AND disabled check box on a datagridview, but could not get the exact result. i m inheriting new class from base class DataGridViewCheckBoxCell and DataGridViewCheckBoxColumn, but could not handle Paint function in it. Not getting the check box printed on exact locations. Can anyone give me some easier solution for this? because the grid consists of other columns with normal text and five columns with check boxes.

推荐答案

为什么必须绘制它们?为什么不将它们的状态设置为您想要的样子?
Why do you have to draw them ? Why not just set their state to be what you want them to look like ?


我在该场景中找到了很好的文章.它将对您有所帮助.

DataGridView中的禁用复选框列 [
I have found very good article on the scenario. It will help you surely.

Disabled Checkbox Column in the DataGridView[^]



HTH


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

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