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

typed dataset xsd

Hi,

I have created a typed dataset (xsd file) with 2 tables and a relation
between them
in VS2005.

How I do I now bind that dataset to a Gridview??

When i do this the page is blank.

ds = New DataSet1()

gridview1.Datasource = ds
gridview1.DataBind()
Example code would be helpful cause I am lost??

rotsey

Dec 9 '06 #1
13 4632

You have to pick one of the tables.
gridview1.Datasource = ds.Tables[0];
gridview1.DataBind()
And you probably have to define some fields (boundColumns?) in the Grid
itself.

"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:eB**************@TK2MSFTNGP05.phx.gbl...
Hi,

I have created a typed dataset (xsd file) with 2 tables and a relation
between them
in VS2005.

How I do I now bind that dataset to a Gridview??

When i do this the page is blank.

ds = New DataSet1()

gridview1.Datasource = ds
gridview1.DataBind()
Example code would be helpful cause I am lost??

rotsey

Dec 9 '06 #2
Hi,
There are more than one table in your dataset.So you need to set datamember
property of the gridview also.You will find complete working code in the
following URL :
http://www.samspublishing.com/articl...p?p=25460&rl=1

Thanks and regards,
manish bafna

"Rotsey" wrote:
Hi,

I have created a typed dataset (xsd file) with 2 tables and a relation
between them
in VS2005.

How I do I now bind that dataset to a Gridview??

When i do this the page is blank.

ds = New DataSet1()

gridview1.Datasource = ds
gridview1.DataBind()
Example code would be helpful cause I am lost??

rotsey

Dec 9 '06 #3
Making an instance of a typed dataset is only step one. You need to
populate it with data before a grid that is bound to it would show anything.
"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:eB**************@TK2MSFTNGP05.phx.gbl...
Hi,

I have created a typed dataset (xsd file) with 2 tables and a relation
between them
in VS2005.

How I do I now bind that dataset to a Gridview??

When i do this the page is blank.

ds = New DataSet1()

gridview1.Datasource = ds
gridview1.DataBind()
Example code would be helpful cause I am lost??

rotsey

Dec 9 '06 #4
On Sun, 10 Dec 2006 00:03:56 +1100, Rotsey wrote:
Hi,

I have created a typed dataset (xsd file) with 2 tables and a relation
between them
in VS2005.

How I do I now bind that dataset to a Gridview??

When i do this the page is blank.

ds = New DataSet1()

gridview1.Datasource = ds
gridview1.DataBind()

Example code would be helpful cause I am lost??

rotsey
You don't seem to be populating your dataset with any data! Also, if there
is more than one table, you need to set the datamember property to one of
the tables
--
Bits.Bytes
http://bytes.thinkersroom.com
Dec 9 '06 #5
Guys,

I realize I have to populate the dataset.

I am trying to create a Grdview with nested data
ie showing parent/child rows.

I have found out doing some googling that all I do is
set up a relation in the dataset between the 2 tables
and then bind it to a grdiview and it will do the rest.

I have this code now.
Dim dtProj As DataSet1.ProjectsDataTable

Dim dtUser As DataSet1.UsersDataTable

dtProj = New DataSet1TableAdapters.ProjectsTableAdapter().GetPr ojects

dtUser = New DataSet1TableAdapters.UsersTableAdapter().GetUsers

Me.GridView1.DataSource = dtProj

Me.DataBind()

Here I am only binding one table. How do I bind the dataset???????

rotsey


"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:eB**************@TK2MSFTNGP05.phx.gbl...
Hi,

I have created a typed dataset (xsd file) with 2 tables and a relation
between them
in VS2005.

How I do I now bind that dataset to a Gridview??

When i do this the page is blank.

ds = New DataSet1()

gridview1.Datasource = ds
gridview1.DataBind()
Example code would be helpful cause I am lost??

rotsey

Dec 10 '06 #6
You are already binding your GridView to a table in the dataset. That's all
you need.
"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:u8**************@TK2MSFTNGP06.phx.gbl...
Guys,

I realize I have to populate the dataset.

I am trying to create a Grdview with nested data
ie showing parent/child rows.

I have found out doing some googling that all I do is
set up a relation in the dataset between the 2 tables
and then bind it to a grdiview and it will do the rest.

I have this code now.
Dim dtProj As DataSet1.ProjectsDataTable

Dim dtUser As DataSet1.UsersDataTable

dtProj = New DataSet1TableAdapters.ProjectsTableAdapter().GetPr ojects

dtUser = New DataSet1TableAdapters.UsersTableAdapter().GetUsers

Me.GridView1.DataSource = dtProj

Me.DataBind()

Here I am only binding one table. How do I bind the dataset???????

rotsey


"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:eB**************@TK2MSFTNGP05.phx.gbl...
>Hi,

I have created a typed dataset (xsd file) with 2 tables and a relation
between them
in VS2005.

How I do I now bind that dataset to a Gridview??

When i do this the page is blank.

ds = New DataSet1()

gridview1.Datasource = ds
gridview1.DataBind()
Example code would be helpful cause I am lost??

rotsey


Dec 10 '06 #7
But I am trying to bind to the dataset.

So how do you get the parent/child functionality in the
gridview??????????????/
"Scott M." <s-***@nospam.nospamwrote in message
news:uC**************@TK2MSFTNGP06.phx.gbl...
You are already binding your GridView to a table in the dataset. That's
all you need.
"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:u8**************@TK2MSFTNGP06.phx.gbl...
>Guys,

I realize I have to populate the dataset.

I am trying to create a Grdview with nested data
ie showing parent/child rows.

I have found out doing some googling that all I do is
set up a relation in the dataset between the 2 tables
and then bind it to a grdiview and it will do the rest.

I have this code now.
Dim dtProj As DataSet1.ProjectsDataTable

Dim dtUser As DataSet1.UsersDataTable

dtProj = New DataSet1TableAdapters.ProjectsTableAdapter().GetPr ojects

dtUser = New DataSet1TableAdapters.UsersTableAdapter().GetUsers

Me.GridView1.DataSource = dtProj

Me.DataBind()

Here I am only binding one table. How do I bind the dataset???????

rotsey


"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:eB**************@TK2MSFTNGP05.phx.gbl...
>>Hi,

I have created a typed dataset (xsd file) with 2 tables and a relation
between them
in VS2005.

How I do I now bind that dataset to a Gridview??

When i do this the page is blank.

ds = New DataSet1()

gridview1.Datasource = ds
gridview1.DataBind()
Example code would be helpful cause I am lost??

rotsey



Dec 10 '06 #8
http://www.google.com/search?hl=en&q=gridview+nested

http://www.codeguru.com/columns/vb/article.php/c12647/

"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:eB**************@TK2MSFTNGP05.phx.gbl...
Hi,

I have created a typed dataset (xsd file) with 2 tables and a relation
between them
in VS2005.

How I do I now bind that dataset to a Gridview??

When i do this the page is blank.

ds = New DataSet1()

gridview1.Datasource = ds
gridview1.DataBind()
Example code would be helpful cause I am lost??

rotsey

Dec 10 '06 #9
thanks sloan.

but I was lead to believe that I could point a dataset at a gridview

and it would render the grid with + and - where you could
expand and collapse rows.

is this just fantasy land??????

I just had a thought, as I don't want edit capability would
crystal reports do the job??????????????

"sloan" <sl***@ipass.netwrote in message
news:er*************@TK2MSFTNGP04.phx.gbl...
http://www.google.com/search?hl=en&q=gridview+nested

http://www.codeguru.com/columns/vb/article.php/c12647/

"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:eB**************@TK2MSFTNGP05.phx.gbl...
>Hi,

I have created a typed dataset (xsd file) with 2 tables and a relation
between them
in VS2005.

How I do I now bind that dataset to a Gridview??

When i do this the page is blank.

ds = New DataSet1()

gridview1.Datasource = ds
gridview1.DataBind()
Example code would be helpful cause I am lost??

rotsey


Dec 11 '06 #10
You don't point DataSets at controls, you point controls a data sources
(such as DataSets).
"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:ew**************@TK2MSFTNGP06.phx.gbl...
thanks sloan.

but I was lead to believe that I could point a dataset at a gridview

and it would render the grid with + and - where you could
expand and collapse rows.

is this just fantasy land??????

I just had a thought, as I don't want edit capability would
crystal reports do the job??????????????

"sloan" <sl***@ipass.netwrote in message
news:er*************@TK2MSFTNGP04.phx.gbl...
>http://www.google.com/search?hl=en&q=gridview+nested

http://www.codeguru.com/columns/vb/article.php/c12647/

"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:eB**************@TK2MSFTNGP05.phx.gbl...
>>Hi,

I have created a typed dataset (xsd file) with 2 tables and a relation
between them
in VS2005.

How I do I now bind that dataset to a Gridview??

When i do this the page is blank.

ds = New DataSet1()

gridview1.Datasource = ds
gridview1.DataBind()
Example code would be helpful cause I am lost??

rotsey



Dec 11 '06 #11
so intelligent....but not enough to answer the question.
"Scott M." <s-***@nospam.nospamwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
You don't point DataSets at controls, you point controls a data sources
(such as DataSets).
"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:ew**************@TK2MSFTNGP06.phx.gbl...
>thanks sloan.

but I was lead to believe that I could point a dataset at a gridview

and it would render the grid with + and - where you could
expand and collapse rows.

is this just fantasy land??????

I just had a thought, as I don't want edit capability would
crystal reports do the job??????????????

"sloan" <sl***@ipass.netwrote in message
news:er*************@TK2MSFTNGP04.phx.gbl...
>>http://www.google.com/search?hl=en&q=gridview+nested

http://www.codeguru.com/columns/vb/article.php/c12647/

"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:eB**************@TK2MSFTNGP05.phx.gbl...
Hi,

I have created a typed dataset (xsd file) with 2 tables and a relation
between them
in VS2005.

How I do I now bind that dataset to a Gridview??

When i do this the page is blank.

ds = New DataSet1()

gridview1.Datasource = ds
gridview1.DataBind()
Example code would be helpful cause I am lost??

rotsey





Dec 11 '06 #12
And, if you'd like to continue being sarcastic, you'll have a hard time
getting any information. I was simply trying to alert you to the basic
premis of databinding, which by your question seemed like it needed some
enlightenment.
"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:uJ**************@TK2MSFTNGP03.phx.gbl...
so intelligent....but not enough to answer the question.
"Scott M." <s-***@nospam.nospamwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
>You don't point DataSets at controls, you point controls a data sources
(such as DataSets).
"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:ew**************@TK2MSFTNGP06.phx.gbl...
>>thanks sloan.

but I was lead to believe that I could point a dataset at a gridview

and it would render the grid with + and - where you could
expand and collapse rows.

is this just fantasy land??????

I just had a thought, as I don't want edit capability would
crystal reports do the job??????????????

"sloan" <sl***@ipass.netwrote in message
news:er*************@TK2MSFTNGP04.phx.gbl...
http://www.google.com/search?hl=en&q=gridview+nested

http://www.codeguru.com/columns/vb/article.php/c12647/

"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:eB**************@TK2MSFTNGP05.phx.gbl...
Hi,
>
I have created a typed dataset (xsd file) with 2 tables and a relation
between them
in VS2005.
>
How I do I now bind that dataset to a Gridview??
>
When i do this the page is blank.
>
ds = New DataSet1()
>
gridview1.Datasource = ds
gridview1.DataBind()
>
>
Example code would be helpful cause I am lost??
>
rotsey
>
>
>




Dec 12 '06 #13
fine.....it sounded like a smart comment.....I apologize
"Scott M." <s-***@nospam.nospamwrote in message
news:eQ**************@TK2MSFTNGP06.phx.gbl...
And, if you'd like to continue being sarcastic, you'll have a hard time
getting any information. I was simply trying to alert you to the basic
premis of databinding, which by your question seemed like it needed some
enlightenment.
"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:uJ**************@TK2MSFTNGP03.phx.gbl...
>so intelligent....but not enough to answer the question.
"Scott M." <s-***@nospam.nospamwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
>>You don't point DataSets at controls, you point controls a data sources
(such as DataSets).
"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:ew**************@TK2MSFTNGP06.phx.gbl...
thanks sloan.

but I was lead to believe that I could point a dataset at a gridview

and it would render the grid with + and - where you could
expand and collapse rows.

is this just fantasy land??????

I just had a thought, as I don't want edit capability would
crystal reports do the job??????????????

"sloan" <sl***@ipass.netwrote in message
news:er*************@TK2MSFTNGP04.phx.gbl...
http://www.google.com/search?hl=en&q=gridview+nested
>
http://www.codeguru.com/columns/vb/article.php/c12647/
>
>
>
"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:eB**************@TK2MSFTNGP05.phx.gbl.. .
>Hi,
>>
>I have created a typed dataset (xsd file) with 2 tables and a
>relation
>between them
>in VS2005.
>>
>How I do I now bind that dataset to a Gridview??
>>
>When i do this the page is blank.
>>
>ds = New DataSet1()
>>
>gridview1.Datasource = ds
>gridview1.DataBind()
>>
>>
>Example code would be helpful cause I am lost??
>>
>rotsey
>>
>>
>>
>
>




Dec 13 '06 #14

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...
1
by: Trond | last post by:
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...
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 ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: 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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.