473,384 Members | 1,854 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,384 software developers and data experts.

Typed dataset

I have a class MessageController that has a method GetMessagesDataset that
connects to a database SPROC. When done it returns a dataset.

Then in my ASP.NET for i do this:

msgController = new MessagesController();

DataSet dsMessages = new Dataset();

dsMessages = msgController.GetMessagesDataset();

dgMessages.DataSource=dsMessages;

DataBind();

As you se i am binding datagrid dgMessages to the dataset and voila i hava a
datagrid with data. Then i am starting to think that it would be nice to
format the datagrid using the wizard.

So i need to create a typed dataset. I can then use the typed dataset as
datasource and format my grid. But i do not get any data in the grid then.
So i am thinking maybe i should fill an object based on the typed dataset
and i am lost. How can i solve this?

Best regards
Trond
Nov 19 '05 #1
1 1225
Hi, Trond!

I'm not sure if I get this correctly, but if you have created a schema with
generated typed dataset with Visual Studio, you should be able to drag a
DataSet component to your form. When you do this you get to choose if it
should represent one of your typed datasets. If you select one, you can set
the datasource of the datagrid with the property editor in the designer. In
addition you have to choose which DataMember to display (table). Now you can
right-click your grid, choose property designer and start formatting based
on the schema.

Hope this helps. :)
Lars-Erik

"Trond" <tr***@montanis.com> wrote in message
news:OB**************@tk2msftngp13.phx.gbl...
I have a class MessageController that has a method GetMessagesDataset that
connects to a database SPROC. When done it returns a dataset.

Then in my ASP.NET for i do this:

msgController = new MessagesController();

DataSet dsMessages = new Dataset();

dsMessages = msgController.GetMessagesDataset();

dgMessages.DataSource=dsMessages;

DataBind();

As you se i am binding datagrid dgMessages to the dataset and voila i hava
a
datagrid with data. Then i am starting to think that it would be nice to
format the datagrid using the wizard.

So i need to create a typed dataset. I can then use the typed dataset as
datasource and format my grid. But i do not get any data in the grid then.
So i am thinking maybe i should fill an object based on the typed dataset
and i am lost. How can i solve this?

Best regards
Trond

Nov 19 '05 #2

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

Similar topics

1
by: Job Lot | last post by:
I am confused how strongly typed dataset is different from un-typed dataset. Is there any good link explaining pros and cons of both? Which one should be used preferably?
1
by: Nedu N | last post by:
Hi All, I am facing problem in copying content of table from a untyped dataset into to a table inside the typed dataset. I wanted to copy the data into typed dataset in order to ease the further...
2
by: BeanTownBizTalkGuru | last post by:
Trying to get some feedback. Here's the scenerio. We are processing XML data which we generated a typed dataset to represent the XML document being processed. After procesing is complete we...
1
by: HardBap | last post by:
I've created a strongly typed DataSet (Customers.xsd) using the xsd.exe tool. I want to be able to access fields using ds.Customer.CompanyName. The problem is when I return this DataSet from a...
3
by: Freeon | last post by:
Hi, I am looking for a way to sort a strong typed dataset. It would seem the most straightforward way is to use a dataview. The only problem is when I use the dataview I seem to loose the strong...
1
by: Optimus | last post by:
Hi everyone, I currently develop an application in vs.net 2005 with vb.net. I was trying to use typed dataset and I've got in trouble for converting untyped dataset into Typed DataSet. I don't...
4
by: Ronald S. Cook | last post by:
I've always used untyped datasets. In a Microsoft course, it walks through creating typed datasets and harps on the benefits. It has you drag all these things around ..wizard, wizard, wizard......
21
by: Peter Bradley | last post by:
Hi all, This post is sort of tangentially related to my earlier posts on configuration files for DLLs. Does anyone know how to create typed DataSets using VS2005's new DataSet designer, but...
4
by: Rachana | last post by:
Hi, I have understood Data Sets but what is meant by typed/untyped/ strongly typed datasets. Can any one explain me or suggest any site/ article, to get these concepts (and their ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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...

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.