How to display a usercontrol in DataGridView C#

Mike 1 Reputation point


in my program i have a DataGridView and i want to have a column with multiple custom buttons (e.g. edit button, delete button, copy button).

How can i do this?

Thanks in advance

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,026 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: The period of time during which a program is being executed in a computer.
960 questions
Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,331 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Karen Payne MVP 29,236 Reputation points MVP

    To do this requires a bit of an effort to draw each image in cell paint event while without an image like the one I did below is a good deal easier.

    In the screenshot below the button only appear on the current row and adding additional columns is easy. Base code is here in the following repository.


    If you really want a clean/polish look than check out telerik grid here.

    No comments