• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 851
  • Last Modified:

Datagridview cell values disappearing

Hi

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.
Regards
0
alungwyther
Asked:
alungwyther
  • 4
  • 2
1 Solution
 
rockas1982Commented:
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
0
 
alungwytherAuthor Commented:
Hi

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.

0
 
rockas1982Commented:
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
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
alungwytherAuthor Commented:
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.

0
 
gangwischCommented:
are you assigning the values dg1.item(1,1).value="5"
if you are try using dg1.item(1,1).editedformattedvalue="5"
0
 
alungwytherAuthor Commented:
Hi gangwisch

The grids are bound to a datatable so the values are not manually assigned.
0
 
alungwytherAuthor Commented:
Hi rockas1982

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

Alun
0

Featured Post

Independent Software Vendors: 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!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now