none
Black backcolor appears on a datagrid combobox cell

    Question

  • I have a datagridview that all of a sudden starts showing the backcolor as 'black' when in edit mode. I have 6 datagridviews on the form they all act correctly. any ideas? Jim
    Tuesday, March 6, 2018 5:49 PM

Answers

  • I tried all the suggestions. It still happens albeit on a sporadic basis.  Somewhere there is a combination of parameters on this datagridview that is causing the problem. But I don't think it is useful to try further.  I'll just superimpose a standalone combobox over the particular cell and control it myself. Thanks, Jim

    Jim

    • Marked as answer by Jim Palatine Saturday, March 10, 2018 4:44 PM
    Saturday, March 10, 2018 4:44 PM

All replies

  • Hi Jim,

    Thank you posting here.

    What’s the version of Visual Studio do you use?

    Is your project a Windows Forms project?

    Could you please share the screenshot of that scenario? This will help us understand your issue and find the reason.

    I suggest you could create a new form, and add DataGridView on the form, check if that issue still persist.

    If it works fail, please have a try with the following to troubleshoot this issue:

    Go to the VS installation location, usually locates “C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE” and run the following commands.

    devenv /resetuserdata: clear the old user data

    devenv /safemode: run the VS as safe, if it works fine that means the installed extensions may be corrupted the VS, please go to Tool—Extensions and Updates… and remove all installed extensions one by one to find the culprit.

    If it works fine, this issue might be caused by the specify project, please try to create a new one.

    If above method could not help you, please try to change the color of the system, check the result.

    Thanks for your understanding.

    Regards,

    Judyzh


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, March 7, 2018 8:49 AM
  • I am using VS2013.  It is Windows Forms. This first screen shot shows the combobox with the black background.  The next shows the black background on a textbox.  The third shows the next datagridview with a normal background on the same form. Only this datagridview acts up, but they are all mere copies of one another.  I tried your other suggestions about creting new datagridviews and it reocurrs sporadically. I'm stumped.  Jim

     

    Jim

    Thursday, March 8, 2018 11:07 PM
  • Hi Jim,

    >> I have a datagridview that all of a sudden starts showing the backcolor as 'black' when in edit mode

    Do you mean the issue be occurs sometimes?

    Do you add the styles of the combobox in your code?

    Please close all the instance on your computer, restart the computer. Then, open your project again use visual studio, check the result?

    Based on the screenshot, there are many controls were loading at the same time, perhaps it caused by the control's rendering affected by too many controls.

    Please reset the background color after the Form has finished loading. Refer to: https://msdn.microsoft.com/en-us/library/system.windows.forms.control.backcolor%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

    If the issue persists, I suggest you try to test on the other computer. If it works fine, this means the issue is caused by the computer.

    Regards,

    Judyzh


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 9, 2018 9:46 AM
  • I tried all the suggestions. It still happens albeit on a sporadic basis.  Somewhere there is a combination of parameters on this datagridview that is causing the problem. But I don't think it is useful to try further.  I'll just superimpose a standalone combobox over the particular cell and control it myself. Thanks, Jim

    Jim

    • Marked as answer by Jim Palatine Saturday, March 10, 2018 4:44 PM
    Saturday, March 10, 2018 4:44 PM