Solved

Datagridview cell values disappearing

Posted on 2006-12-01
7
832 Views
Last Modified: 2008-02-01
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
Comment
Question by:alungwyther
  • 4
  • 2
7 Comments
 
LVL 1

Accepted Solution

by:
rockas1982 earned 500 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
0
 

Author Comment

by:alungwyther
ID: 18059220
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
 
LVL 1

Expert Comment

by:rockas1982
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
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:alungwyther
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.

0
 
LVL 10

Expert Comment

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

Author Comment

by:alungwyther
ID: 18059663
Hi gangwisch

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

Author Comment

by:alungwyther
ID: 18122762
Hi rockas1982

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

Alun
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

Title # Comments Views Activity
VB.NET 2008 Populate DataModel with DataTable 44 38
Crystal reports vb.net 2 54
cannot connect to sqlserver 8 35
DataGridView / get bound table name? 8 24
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…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

856 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