DataGridViewComboxColumn Background changed to color Black !
Hi,
I've a added a datagridviewComboxColumn to my grid that has datasource set to a list.
The problem that I'm encountering is when I've selected and item from the combox and then move to a different row and select a different item from that row combobox.
A solid black colour border around the cell and when you clicked on the combox dropdown button the background colour is back. What am I doing wrong?
Can someone help please .
Your help would be much appreciated.
Many thanks
[512 byte] By [
YL99] at [2007-12-24]
Check the DefaultCellStyle property in the properties window of your datagridview. You can set colors there but I believe the default is blue, so you must of changed it. If that is the problem.
Another thing to check, is the columns property of your datagridview. Click on your comboboxcolumn, and I am not sure what you have, but I have Display Style = DropDownButton, the defaultcellstyle should be set to the DataGridViewCellStyle considering it is what you want.
hope that helps
I have been trying to recreate the problem in one of my projects using your code, and I can't seem to make it happen. I would reconsider setting the datagridview.backgroundcolor if you have a cell style. You are setting the alternating rows to your style, and also columns[1]. There is something interferring here. Do a little trial and error, comment out a line where you are setting styles and background colors. Sorry if this does not help any.