Objects and code from datagrid disappearing!

M

Mike Cooper

Hello all,

This is an extremely frustrating issue. I have a datagrid that is
populated with three different custom datagridtextboxcolumns that I
inherited they all work perfectly, while the code exist! The problem
is that every now and then, when I switch between the design view and
the code view, the instantiating code vanishes. Specifically, the
instantiating code like the following:

Me.RushBoolColumn = new MyRushboolColumn
Me.Master_DataGridTextBoxColumn_1 = new Master_DatagridTextBoxColumn

....etc.

Just disppears! The entry that includes these columnstyles into my
tablestyle disappears with it. All that is left is the defining
classes, and the initial definitions:

Public RushBoolColumn as RushBoolColumn
Public Master_DataGridTextBoxColumn_1 as Master_DatagridTextBoxColumn

etc.

Naturally, I wind up with dozens of build errors, in a program that
was working perfectly before!

After painstakingly putting all of the missing code back in, the
program again runs fine. Until the next time it happens. Sometimes
this happens 2-3 times a day. Sometimes it doesn't happen at all. I
can't find a pattern, except that it seems to happen when I switch
between views and it seems to happen more often when I check the
datagrid properties window.

I am using Visual Basic 2002. I have never had these problems before,
though I have also never used a datagrid before. Can anyone help?

thank you,
Mike Cooper
 
M

Mike Cooper

Me again,

No one has responded so far, nad I am still getting the problem. I
did notice that on the godotnet forum at:

http://www.gotdotnet.com/community/messageboard/Thread.aspx?id=16732

Some has described the same problem that I am having. Several people
responded to him to say that they had the same problem, but no one had
an answer to it.

Well someone must. This is the kind of problem that would sink an
application, even one from Microsoft if there wasn't a fix or a
workaround to it. If anyone knows, please enlighten me. My project
is already well behind schedule!

Thank you,
Mike Cooper
 
C

Chris Dunaway

What portion of the code is this happening in? You should not make changes
to the section under "Windows Form Designer Generated Code" are you? That
section can get regenerated when switching from design to code and back.

Not sure if this is your problem, if not, I don't have any further answers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top