awesome-inc / FontAwesome.Sharp

A library for using Font Awesome in WPF & Windows Forms applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Icon button in datagridview

meszolym opened this issue · comments

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:

  • Just a copy of the existing DataGridViewButtonColumn / DataGridViewButtonCell, one button per column, with but not only text, also an icon could be added, just like with the IconButton control.
  • Something similar to this, which lets you add as many buttons as you like, but only with icons, no text.

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!

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.

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

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.

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

This sounds really nice, thanks!

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