add multiple buttons to a datagridviewbuttoncell

3k Views Asked by At

I would like to add multiple buttons to a datagridviewbuttoncell

imagine 1 column contains a simple integer count

the button column next to it would have 2 buttons, one + and one -

then for example subscribe the click events to increment or decrement the text column counter following if + or - was clicked

is this possible ?

1

There are 1 best solutions below

0
On

I doubt you can easily modify DataGridViewButtonCell. But you can always create your own control and put in a cell like described here: How to place a custom control within a cells of datagridview in window form

1) Create custom control, implement IDataGridViewEditingControl IDataGridViewEditingControl Interface.

2) How to: Host Controls in Windows Forms DataGridView Cells