awesome-inc / FontAwesome.Sharp

A library for using Font Awesome in WPF & Windows Forms applications
Apache License 2.0
382 stars 89 forks source link

Icon button in datagridview #95

Closed meszolym closed 2 months ago

meszolym commented 2 years ago

Is your feature request related to a problem? Please describe. N/A

Describe the solution you'd like I love icon buttons, and I'd love to use them in the datagridview control. I have two ideas, any of these would be fantastic in my opinion:

Describe alternatives you've considered I was thinking about making it for myself, although this would be my first time doing something like this. Other than that, none.

Additional context These could be super useful to CRUDs!

meszolym commented 2 years ago

Some help may be found here: https://docs.microsoft.com/en-us/dotnet/desktop/winforms/controls/how-to-host-controls-in-windows-forms-datagridview-cells?view=netframeworkdesktop-4.8

mkoertgen commented 2 years ago

Hi @iudexhun,

I see. DataGridView would be WinForms as well as DataGridViewButtonColumn. Pretty much using a special column with button-actions is a pretty good and common use case.

One could try the Text-property but this would be rather limited (font, colors, click-events, etc.).

Thanks for the idea. I will get back to you, once I have made up my mind about this. For now, adding a special DatagridViewButtonColumn seems like the way to go for WinForms.

mkoertgen commented 2 years ago

Would you be able to prepare a small demo app? Probably similar to the linked screenshot?

meszolym commented 2 years ago

Hi @mkoertgen, Sadly I am way too beginner to do this myself, but there are a couple of sources I have seen, I can link you some:

Also, the photo I linked is from a web app, but having read the sources, what we're trying to achieve here is surely possible, I'm just not competent enough with winforms and c# to get this to work.

mkoertgen commented 2 years ago

Thank @iudexhun , I will probably come up with an example adding to the WinForms-Sample in this repo.

meszolym commented 2 years ago

This sounds really nice, thanks!

WilliamQue commented 1 year ago

Waiting for the example of DataGridViewIconButton[Cell|Column], @mkoertgen