Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27336

VS 2010 DataGridViewCheckBoxColumn with Button appearance

$
0
0
I would like to have a DGV with a data-bound column that works like a normal checkbox control with the appearance set to "button".
That is to say, I want the button to "latch" on and off based on the value of some bound boolean data.
I also want the text of the button bound to another data field.

Will this require a custom DataGridViewColumn? I can create a DataGridViewButtonColumn, with the text bound to a data field, but there is no property for button's pressed state to bind the boolean data to.
Do I base it on a DataGridViewButtonColumn and force the button to be pressed based on the boolean data field, or do I base it on a DataGridViewCheckBoxColumn and overwrite it's paint function to show a button in place of the checkbox? Or something else entirely?

Viewing all articles
Browse latest Browse all 27336

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>