473,583 Members | 3,420 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Typed dataset

I have a class MessageControll er that has a method GetMessagesData set that
connects to a database SPROC. When done it returns a dataset.

Then in my ASP.NET for i do this:

msgController = new MessagesControl ler();

DataSet dsMessages = new Dataset();

dsMessages = msgController.G etMessagesDatas et();

dgMessages.Data Source=dsMessag es;

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 1239
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******** ******@tk2msftn gp13.phx.gbl...
I have a class MessageControll er that has a method GetMessagesData set that
connects to a database SPROC. When done it returns a dataset.

Then in my ASP.NET for i do this:

msgController = new MessagesControl ler();

DataSet dsMessages = new Dataset();

dsMessages = msgController.G etMessagesDatas et();

dgMessages.Data Source=dsMessag es;

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
6072
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
1709
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 processing using typed references. DataSet ds = getDataFromDB(); - i am getting the dataset ds from a webservice I have got MyXSD which...
2
2249
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 would like to add/update/delete the data in multiple databases. Here lies the disconnect. The XML representation is seperated from the physical...
1
2176
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 Web Service it adds another Table to the DataSet that contains the data. I have to access the data using ds.Tables.Rows.ToString(). This defeats the...
3
2743
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 typed properties from my original dataset Anyone that can point me to an example of how to sort my dataset and maintain the use of my typed...
1
9347
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 know why I cannot perform this casting operation properly. First off, I've got my Typed DataSet named "AuthInfo" declared and I then created an...
4
9909
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... code gen, code gen, code gen. What's at the end looks slick, but then there's a ton of generated code that I'm going to have to maintain now. ...
21
2406
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 with the ability to configure the connection string via a config file? The designer seems to hard-code the connection string into the dataset...
4
3100
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 comparisions) cleared? Thanks, Rachana
0
7894
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8321
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8191
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5699
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5370
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3816
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3841
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1426
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.