How to add an image button to a datagridview (vb)

Does anyone know how to add an image button to a datagridview using VB winforms?
It is very easy using .net for a .aspx page but this is for a VB Winforms console application.
What I'm really trying to accomplish is to have an image button that works for a Delete button to delete a row.
If the user clicks the image, they get a confirmation message and then I execute the delete code (I have the delete code already)

Thanks in advance
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jacques Bourgeois (James Burger)PresidentCommented:
The DataGridView is limited in many ways, and one of these is that the DataGridViewButtonColumn does not provide the possibility of adding an image.

The easiest way to do that would be to use a DataGridViewImageColumn instead.

IThe other one, if you are at ease with inheritance and the GDI framework would be to inherits from the DataGridViewButtonCell, add the necessary feature and then use your own class instead of the default button cell.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
trstillAuthor Commented:
  Thank you for the reply.  I'm very experienced with .net in .aspx pages but finding out you are correct about the datagridview being limited.
I will try your suggestion.
Do you happen to have any 3rd party development tools for the datagridview control?

Thanks again,
Tom Stilley
trstillAuthor Commented:
  Just a follow up to say that worked exactly how I hoped it would.
Thanks for the help.
Jacques Bourgeois (James Burger)PresidentCommented:
Personally, because I need to train programmers in .NET technologies, I try as much as possible to stick to .NET components. If I was to use third component technologies, I would lose a part of my expertise in Visual Studio as it is used by programmers who start to program in it, and I would not be able to answer properly to their questions.

So what I can say is only from what I hear from other programmers.

There are many replacements for the DataGridView, but most of them cost almost as much as Visual Studio itself (specially since Visual Studio Community edition is now a possible free replacement for the Professional edition).

The 2 most popular grids if hear of all the time are the grids sold by Infragistic and ComponentOne. What I hear is that the Infragistic grid has an incredible look and is relative easy to learn to use, but has some limitations. The ComponentOne has a learning curve and does not look as good, but if you need to do something, it always has it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.