473,396 Members | 1,898 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.

Designer Generated Code

Hi all,

Can anyone give me an example of how to change what code the designer will
generate when creating a typed dataset using the VS wizard? I have been
informed that this is possible but have no idea where to look to be able to
do this. For what I am doing, I do not wish to inherrit or extend this
designer generated code.

Jesse
Jun 20 '06 #1
3 1129
If you click the "Show All Files" option in the Solution Explorer, the .CS
file associated with the typed dataset will appear. You can go in here and
make your changes.

Be careful. The .CS file is (I think) generated as part of the build
process, overriding any changes you've made.

If you're using .NET 2.0, look at using partial classes instead to extend
the class instead (I know you said you didn't want to extend, but it may be
safer).

"Jessard" <Je*****@discussions.microsoft.com> wrote in message
news:0F**********************************@microsof t.com...
Hi all,

Can anyone give me an example of how to change what code the designer will
generate when creating a typed dataset using the VS wizard? I have been
informed that this is possible but have no idea where to look to be able
to
do this. For what I am doing, I do not wish to inherrit or extend this
designer generated code.

Jesse

Jun 21 '06 #2
Hi Brendan,

Thankyou for you input, I am aware of the points you have made. What I was
really getting at though is being able to change the rules the designer uses
to generate code so that the code it generates is different from what it does
currently. I do not have to use partial class overrides.

Jesse

"Brendan Green" wrote:
If you click the "Show All Files" option in the Solution Explorer, the .CS
file associated with the typed dataset will appear. You can go in here and
make your changes.

Be careful. The .CS file is (I think) generated as part of the build
process, overriding any changes you've made.

If you're using .NET 2.0, look at using partial classes instead to extend
the class instead (I know you said you didn't want to extend, but it may be
safer).

"Jessard" <Je*****@discussions.microsoft.com> wrote in message
news:0F**********************************@microsof t.com...
Hi all,

Can anyone give me an example of how to change what code the designer will
generate when creating a typed dataset using the VS wizard? I have been
informed that this is possible but have no idea where to look to be able
to
do this. For what I am doing, I do not wish to inherrit or extend this
designer generated code.

Jesse


Jun 21 '06 #3
Hi,

I would like to know ho to change the generated code also , because I have
the datasets declared in other project then the UI, and it would be nice to
have acces to the column-properties that are currently declared as "Friend"
instead of "Public".

I prefer to use datatable.DescriptionColumn.Name instead of the hardcoded
string "Description", so that when the columnname changes, a compiletime
error is the result instead of a runtime error. Unfortunalty, the
column-properties are generated as friend, and I have to manually modify them
every time I add/modify a column to the datatable.

The "dataset generated code" is not regenerated as part of building the
project though.

Joris
"Brendan Green" wrote:
If you click the "Show All Files" option in the Solution Explorer, the .CS
file associated with the typed dataset will appear. You can go in here and
make your changes.

Be careful. The .CS file is (I think) generated as part of the build
process, overriding any changes you've made.

If you're using .NET 2.0, look at using partial classes instead to extend
the class instead (I know you said you didn't want to extend, but it may be
safer).

"Jessard" <Je*****@discussions.microsoft.com> wrote in message
news:0F**********************************@microsof t.com...
Hi all,

Can anyone give me an example of how to change what code the designer will
generate when creating a typed dataset using the VS wizard? I have been
informed that this is possible but have no idea where to look to be able
to
do this. For what I am doing, I do not wish to inherrit or extend this
designer generated code.

Jesse


Jun 22 '06 #4

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

Similar topics

0
by: MattO | last post by:
Here is the background information: *** *** *** *** *** *** *** *** In order to display enum string values in my application with localized values, I created a class called MyEnumConverter that...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
5
by: Fredrik Melin | last post by:
2005 uses the Partial Class & <form>.Designer.vb for its "windows forms generated code" Anyone know if its faster/better then old 2003 way? Also, when upgrading a 2003 project it did not...
13
by: cj | last post by:
In a project done in 2003 about a year ago I was told to add the SocketWrench code below into the Windows Form Designer generated code area as shown below. #Region " Windows Form Designer...
6
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
Yesterday Visual Studio gave me a strange error both at compiletime and at designtime that had no obvious connection to anything I had changed recently. After some effort tracking down the problem...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.