I want to add a two buttons in a datagridview cell in Winforms, and add click events to both of them. How can I do it?
Asked
Active
Viewed 850 times
0
-
1There are specific column types for DataGridView in WinForms. Please take a look at this link: [How to host controls in a DataGridView Cell](https://learn.microsoft.com/en-us/dotnet/framework/winforms/controls/how-to-host-controls-in-windows-forms-datagridview-cells) – Fuczi Fuczi Dec 06 '17 at 14:24
-
1The DataGridView already has a built-in button column type (`DataGridViewButtonColumn`). It will make your life much easier, if you just add 2 buttons in 2 adjacent columns. – Olivier Jacot-Descombes Dec 06 '17 at 14:37
-
You can create a user control with all those other controls in it you want to add. – DotNet Developer Dec 06 '17 at 15:49