DataGridView – first cell appears blank when navigating bindingsource

20 pts.
Tags:
.NET Framework 3.5
DataGridView
Visual Basic .NET
Hi, In VB.NET I have a DataGridView bound to a BindingSource. If BindingSource's position is changed, the first cell (0,0) in the grid appears blank. If I click in this first cell, the underlying value appears and it can get edited. The value in first cell also re-appears when I click in another cell but this time it's the new clicked cell that is not showing it's value. And leaving the DataGridView's focus doesn't make the values to show. I have tried EndEdit on the BindingSource and the dgv but it changes nothing. How can I get the DataGridView to always show all values ? Thanks

Software/Hardware used:
.NET framework 3.5

Answer Wiki

Thanks. We'll let you know when a new response is added.

I found my mistake. In order to make the selection invisible, I had changed the SelectionBackColor to white so the text color was white on a white background. Setting the SelectionForeColor to black did the job. Selection highlight is invisible but values are now readable.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Docw
    Hi, You can forget my question. I found my mistake. In order to make the selection invisible, I had changed the SelectionBackColor to white so the text color was white on a white background. Setting the SelectionForeColor to black did the job. Selection highlight is invisible but values are now readable.
    20 pointsBadges:
    report
  • carlosdl
    Thanks for posting back.
    68,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following