Datagridview cell values disappearing

Posted on 2006-12-01
Medium Priority
Last Modified: 2008-02-01

I have 2 datagridviews (dg1 & dg2) bound to a dataset and when they are filled one cell in dg2 is empty.
If I click on another cell in dg2 then that cell is selected and the previously empty cell value appears.
But if I then click a cell in dg1 the clicked and selected cell in dg2 becomes empty.

All help appreciated.
Question by:alungwyther
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2

Accepted Solution

rockas1982 earned 1500 total points
ID: 18059214
you have to change the colors
when you focus a cell it take difrent color and probably you have set it to white so white strings with white backround  =empty byt the string is there

Author Comment

ID: 18059220

Thanks for the reply.The cell that has the focus shows the value OK, it is the cell that has lost the focus that appears empty even though there is a value in it.


Expert Comment

ID: 18059245
there is an option for that 2
color for the cell that is focus color for the cell that lost the focus i don't know where exactly cause i use another componet but there must be
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 18059573
Hi rockas1982

The cell that has lost focus is white with no value in it.
If I click on another cell in the same grid it stays white but the value appears.

LVL 10

Expert Comment

ID: 18059615
are you assigning the values dg1.item(1,1).value="5"
if you are try using dg1.item(1,1).editedformattedvalue="5"

Author Comment

ID: 18059663
Hi gangwisch

The grids are bound to a datatable so the values are not manually assigned.

Author Comment

ID: 18122762
Hi rockas1982

Apologies, I didn't read your reply properly or look into it enough but you were right.


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question