Renaming a Dataset

F

farseer

HI,
i have created a DataSet using the DataSet Designer. The default name
is DataSet1.
I then renamed this to "MyDataSet" and proceed to add my TableAdapters
using the Visual Designer. After i am done and i look at the classes
generated, i noticed that they still have the name and namespace
"DataSet1". Why is it that this name did not change?

I attempted to refactor the code to change the name, but VS warns that
this should be done using the Visual Designer. It asks me if i wish to
continue with the refactoring, to which i respond 'yes'. this changes
everything to the desired name. HOWEVER, if i now go back into the
Visual Designer and make changes to the MyDataSet and save, the
classes/namespace are all then renamed back to DataSet1.

How can i resolved this?

Also, i am curious, do most asp.net developers use the visual designer
to create their middle tier data access layer, or do you do it from
scratch? It looks like the visual designer saves a lot of work.
However, i still findt hat the gridview is not flexible enough for my
use and i end up having to write my own rendering using tables. That
may be because i am not well versed in using the GridView however (i
was trying to do groupings, where one row would list the group,
followed by child rows listing the details).

thanks much for your assistance and comment
 
C

Cowboy \(Gregory A. Beamer\)

In .NET 2.0, renaming in the solution explorer works for most objects. If
you are still having an issue, check the underlying language files (.cs or
..vb in most instances) and see if the underlying class name changed. If not,
change it and make sure the reference changes to the proper code behind
file.

Another option is to rename and then right click the file and regenerate the
code behind files.

Hope this helps.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top