Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon button in datagridview #95

Open
meszolym opened this issue Jul 26, 2022 · 7 comments
Open

Icon button in datagridview #95

meszolym opened this issue Jul 26, 2022 · 7 comments

Comments

@meszolym
Copy link

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!

@mkoertgen
Copy link
Member

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
Copy link
Member

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

@meszolym
Copy link
Author

meszolym commented Jul 27, 2022

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
Copy link
Member

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

@meszolym
Copy link
Author

This sounds really nice, thanks!

@WilliamQue
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

3 participants