0

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?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Raju Vadnala
  • 70
  • 1
  • 12
  • 1
    There 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
  • 1
    The 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

0 Answers0