键入的数据集xsd [英] typed dataset xsd

查看:69
本文介绍了键入的数据集xsd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我创建了一个带有2个表格的关联数据集(xsd文件)和一个关系

他们之间

在VS2005中。


我如何将数据集绑定到Gridview?


当我这样做时,页面是空白的。


ds =新DataSet1()


gridview1.Datasource = ds

gridview1.DataBind()

示例代码会有用,因为我迷路了?


rotsey

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 have to pick one of the tables.

gridview1.Datasource = ds.Tables [0];

gridview1.DataBind()
gridview1.Datasource = ds.Tables[0];
gridview1.DataBind()



您可能需要在网格中定义一些字段(boundColumns?)

本身。


" Rotsey" < ma *********** @ RemoveThis.optusnet.com.auwrote in message

news:eB ************** @ TK2MSFTNGP05.phx.gbl ...

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...





我创建了一个带有2的类型化数据集(xsd文件)表格和关系

他们之间
VS2005中的



如何我现在将该数据集绑定到Gridview?


当我这样做时页面是空白的。


ds =新DataSet1()


gridview1.Datasource = ds

gridview1.DataBind()


示例代码会有用,因为我迷路了吗?


rotsey
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



您好,

您的数据集中有多个表。所以你需要设置gridview的datamember

属性。您将在

以下URL中找到完整的工作代码:
htt p://www.samspublishing.com/articl...p?p = 25460& rl = 1


谢谢和问候,

manish bafna


" Rotsey"写道:
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:




我创建了一个带有2个表和关系的类型化数据集(xsd文件) />
他们之间
VS2005中的



我怎么办我现在将该数据集绑定到Gridview?


当我这样做时,页面是空白的。


ds =新DataSet1()


gridview1.Datasource = ds

gridview1.DataBind()


示例代码会有用,因为我迷路了?


rotsey

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


创建类型化数据集的实例只是第一步。在绑定到它的网格显示任何内容之前,你需要使用数据填充它。

Rotsey < ma *********** @ RemoveThis.optusnet.com.auwrote in message

news:eB ************** @ TK2MSFTNGP05.phx.gbl ...
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...




我创建了一个带有2的类型化数据集(xsd文件)表格和关系

他们之间
VS2005中的



如何我现在将该数据集绑定到Gridview?


当我这样做时页面是空白的。


ds =新DataSet1()


gridview1.Datasource = ds

gridview1.DataBind()


示例代码会有用,因为我迷路了吗?


rotsey
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



这篇关于键入的数据集xsd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆