Hi Programmers,
I need to add the checkbox and label in the same cell.I do know how to do that. I can make the datagridviewcolumn to checkbox but then it only shows the checkbox and no place to show label. Can anybody wake me up from this nightmare?
Thanks in advance.
Hi Programmers, I need to add the checkbox and label in the same cell.I
Share
I don’t believe this is possible with the out of the box CheckBoxCell.
Here is an implementation which subclasses the check box column and does some custom painting to draw the label. It is possible to extend this in various ways, such as offering binding for the label text (it currently requires the label text being set directly). My code borrows heavily from this forum post.
Here is code showing the usage: