Toadums
Toadums

Reputation: 2812

How to display a DataGridViewComboBoxColumn without a combobox?

This might by a silly question, but I was wondering if there was a way to have a DataGridViewComboBoxColumn in my DGV, but instead of showing the ugly combobox, it is just a white cell - when the cell is clicked, the dropdown shows up.

My problem is basically that this is really ugly: this

How do you get around this? I am used to working in WPF, not Winforms. Is it possible to just hide the combobox, but have the cell function the exact same way??

Upvotes: 0

Views: 911

Answers (2)

Chibueze Opata
Chibueze Opata

Reputation: 10044

ComboBoxes have three different appearances you can choose from. In this case you're looking for flat appearance. But if you want a beautiful datagridview you might want to check out PF Grid Toolkit. It goes for quite an affordable price.

NB: This page could also prove useful.

Upvotes: 1

Gent
Gent

Reputation: 2685

you would want to handle the cell formatting event.

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellformatting.aspx

Upvotes: 1

Related Questions