Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Bug in Datagridview designer? Columns disappears
 

Bug in Datagridview designer? Columns disappears

I'm having a weird problem with a datagrid i'm working on.

Everything was fine, with about 10 columns nicely adjusted, and then i edited one column, and when clicking OK, all columns had disappeared. Then i press ctrl-z and they get back, but not aligned like before, and some columns missing. I can't ctrl-z anymore.

Now when i try to add the missing columns, i can't use the original name, because it claims it's "not a valid identifier". If i edit the name in code it works - but still - if i edit any columns with the designer, all columns will get whiped again.

Does anyone know what may cause this?

James_Steven  Tuesday, May 01, 2007 9:46 PM

I am having this same problem. Did you ever find a resolution for this? - Thanks!

mtan  Tuesday, October 23, 2007 2:23 PM

I am having this problem as well. Has anyone figured out how to fix this?
toneho  Wednesday, October 24, 2007 8:23 PM

I am having this problem as well.

The only workaround I have found is to allow the recreation of the columns. The reason the name is invalid is because there is still a declaration of the columns in the Designer.cs file. If you go all the way to the bottom and delete the references, you can recreate the columns with the original names.

However, I hesitate to go through all the work of recreating columns when I don't know what caused the problem in the first place.

Jason517  Wednesday, December 05, 2007 4:17 PM
Will Microsoft ever fix this designer problem. Ican't believe it still exists in VS2008.

awdi  Thursday, April 10, 2008 8:17 AM
I got this desiger problem also, even I can not find the declaration in de designer.cs file

Version of the vs is 9.0.21022.8 RTM
OS: Server 2003 ent

awdi wrote:
Will Microsoft ever fix this designer problem. Ican't believe it still exists in VS2008.

Jiessen  Friday, April 18, 2008 1:57 AM

Anyone can help to replay this issues?
Jiessen  Tuesday, April 29, 2008 9:32 AM
The only solution I can find is to manually open the .designer.vb file and delete all references to your missing columns and then recreate the column in the designer. For 1 column I had to delete two lines in seperate sections and a whole section with the properties of the column.

If you have a lot of properties to set I daresay you could cut them out, recreate the column, and paste them back...

Hope this helps someone...
--Rikki
Rikki_UW  Wednesday, November 12, 2008 4:24 PM
I too have had this problem. I resolved it, but this is a guess as to what the problem was.

My last column had a name in the SQL server that had spaces in itbut was held in [] brackets. I renamed the field in the query definition with no spaces. When I updated the data set and then added the column to the datagrid view, my columns did not disappear.

Alex A
  • Proposed As Answer byALEKS A Tuesday, April 14, 2009 1:14 PM
  •  
ALEKS A  Tuesday, January 13, 2009 4:34 AM
Will Microsoft ever fix this designer problem. I can't believe it still exists in VS2008.

 

AAAAAAAAAAAAAAAGGGGGGGGGHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!!!

OVER 10 COLUMNS IN A STUPID DATAGRIDVIEW.

ALL GONE NOW!!!!!!!!!!!!

JUST WENT TO CHANGE THE STUPID FONT, NOW I HAVE NOTHING IN MY DATAGRID.  THERE HAD BEEN A LOT OF TWEAKING ON THE DESIGN OF THE DGV!

MICROSOFT SUCKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  FIX THIS STUPIDITY!!!!!!!!!!
HugeHugh  Wednesday, October 07, 2009 8:39 PM

You can use google to search for other answers

Custom Search

More Threads

• help: Creating Custom ToolStripButton, implementing IButtonControl
• How can i add a verb to a components designer from a different components designer
• Designer Writing Broken Code in InitializeComponent (Class must be serializable?)
• Center text vertically
• To see description in Labels
• Designer generated code missing the new xxx() for my control
• Problem with BackColor of UserControl
• Tabs Voluntarily Rearrange Themselves...
• Barcord Scan
• How to add a button to datagrid column