Re: Objects and code just disappearing!

From: Daniel O'Connell [C# MVP] (onyxkirx_at_--NOSPAM--comcast.net)
Date: 03/11/04


Date: Thu, 11 Mar 2004 01:55:52 -0600

Are you by chance inserting this code inside the region marked do not
modify(the InitalizeComponent method)? There is a reason for that warning,
the editor will(possibly) wipe out code in that region.
"Mike Cooper" <bidalah@yahoo.com> wrote in message
news:df4443e2.0403072038.214b9bf8@posting.google.com...
> 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



Relevant Pages

  • Re: Objects and code from datagrid disappearing!
    ... > the code view, the instantiating code vanishes. ... All that is left is the defining ... > Public RushBoolColumn as RushBoolColumn ... > datagrid properties window. ...
    (microsoft.public.dotnet.general)
  • Re: Objects and code just disappearing!
    ... > the code view, the instantiating code vanishes. ... All that is left is the defining ... > Public RushBoolColumn as RushBoolColumn ... > datagrid properties window. ...
    (microsoft.public.dotnet.faqs)
  • Objects disappearing from datagrid!
    ... the code view, the instantiating code vanishes. ... All that is left is the defining ... Public RushBoolColumn as RushBoolColumn ... datagrid properties window. ...
    (microsoft.public.dotnet.languages.vb.controls)
  • datagridtextboxcolumns and code disappearing!
    ... the code view, the instantiating code vanishes. ... All that is left is the defining ... Public RushBoolColumn as RushBoolColumn ... datagrid properties window. ...
    (microsoft.public.dotnet.languages.vb.controls)
  • Objects and code from datagrid disappearing!
    ... the code view, the instantiating code vanishes. ... All that is left is the defining ... Public RushBoolColumn as RushBoolColumn ... datagrid properties window. ...
    (microsoft.public.dotnet.general)