473,396 Members | 1,871 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

VS2005 Autogenerated Code Overwrites my class code

Hi, i'm having a strange issue, I've created a Class dervived from a
DataGridView that has all my columns, events properties etc defined. I take
this class and instanciate it on a Form. The problem is when I modify a
object on the parent form (say resize a button, change colors) the auto code
gernerator inserts its own code into the initialization section of the parent
to create the datagridview essentially duplicating all the columns and its
properties. How can I stop the code gererator from inserting its own code
for my datagridview, my class has everything already defined. Its really
annoying I have to delete all the code it throws in after every little change.
Jun 27 '08 #1
1 1005
Kerry wrote:
Hi, i'm having a strange issue, I've created a Class dervived from a
DataGridView that has all my columns, events properties etc defined. I take
this class and instanciate it on a Form. The problem is when I modify a
object on the parent form (say resize a button, change colors) the auto code
gernerator inserts its own code into the initialization section of the parent
to create the datagridview essentially duplicating all the columns and its
properties. How can I stop the code gererator from inserting its own code
for my datagridview, my class has everything already defined. Its really
annoying I have to delete all the code it throws in after every little change.
You'll need to find a tutorial, book, article, whatnot on writing
components. It's not as easy as just plunking together a class. Well, it
is if you're instantiating it yourself, but once you let Visual Studio
have it, all sorts of magic happens.

You can control this magic, however, but you need to know how to do it.
I don't, but I do know there are excellent books out there on the subject.

--
Lasse Vågsæther Karlsen
mailto:la***@vkarlsen.no
http://presentationmode.blogspot.com/
PGP KeyID: 0xBCDEA2E3
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Paul Cochrane | last post by:
Hi all, I've got an application that I'm writing that autogenerates python code which I then execute with exec(). I know that this is not the best way to run things, and I'm not 100% sure as to...
16
by: Joe Fallon | last post by:
I have a C# class that works correctly. I translated it to VB and now it runs differently. The C# class evaluates the Public properties and then executes MyBase.New. So default values are set...
10
by: GaryDean | last post by:
A couple of weeks ago I reported a bug in vs2005 where it corrupted projects converted from vs2003 if a 2003 dataset were modified or recreated. Steven Cheng was able to recreate the bug. I ...
0
by: ME | last post by:
When I view my report using the Embedded web server in VS 2005 it works great. But the same source running on my IIS6 server displays intially with "A data source instance has not been supplied...
5
by: Charts | last post by:
I recently upgraded to VS2005. I noticed that in ASP.NET project, the system generated codes are missing from default.aspx.cs file. While I used to be able to see it in VS2003 project. Now, if I...
9
by: Larry Charlton | last post by:
I've begun trying to create some basic applications and controls and am left wondering if Microsoft rushed this to market, is just anti-web standards, or just wants it to be hard to create great...
2
by: Sagaert Johan | last post by:
Hi The Dataset wizard in VS2005 generates a setting entry for the connectionstring. The connectionstring is in the settings file. Setting the property to a dynamic value by writing to the...
0
by: John Olbert | last post by:
I have been given the task of finding ways to use legacy ActiveX controls in C# applications under Vs2005/Net2.0. At this time I am trying to use a number of ActiveX controls built with Visual...
1
by: alberto | last post by:
Hi all, I have been using C# .NET for about 3 months now. I have been programming in other (Borland C++ Builder, Flash...) environments for years. I have to do a small application in WindowsCe,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.