Click here to Skip to main content
16,022,538 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted

Why do you have to draw them ? Why not just set their state to be what you want them to look like ?
 
Share this answer
 
Comments
Developer_2010 20-Jul-10 4:54am    
even i set their state as enabled/disabled but they look like enabled, instead they should be grey in color.
I have found very good article on the scenario. It will help you surely.

Disabled Checkbox Column in the DataGridView[^]



HTH
 
Share this answer
 
Comments
Developer_2010 20-Jul-10 4:57am    
I used somewhat similar code. But there are few lines in this code that I didnot have in my code. I will add them in my application and check the results. Thanks!!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900