两个DataGrids,相同的DataSource [英] Two DataGrids, same DataSource

查看:80
本文介绍了两个DataGrids,相同的DataSource的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须每个DataGrids共享相同的DataSource。用户希望能够在每个网格中选择不同的行,但由于它们在一个网格中选择了一行时共享相同的

源,因此选择了相同的行在

其他网格中。


我宁愿没有两个包含相同数据的单独来源,因为

有经常有几千行。


有没有办法解决这个问题?


-


干杯,


elziko

解决方案

嗨Elziko,


我从来没有这样做过,但你是否用你的数据集副本试了一下

dim mynewdataset = myolddataset.copy

http://msdn.microsoft.com/library /de...scopytopic.asp

我希望这有帮助吗?


Cor


<集团kquote>为每一个创建一个数据视图,即使它是同一个表...然后将每个网格绑定到不同的数据视图。

" elziko" < EL **** @ NOTSPAMMINGyahoo.co.uk>在消息中写道

新闻:Oy ************** @ TK2MSFTNGP10.phx.gbl ...

我每个都要DataGrids共享相同的DataSource。用户希望能够在每个网格中选择不同的行,但由于它们在一个网格中选择行时共享相同的源,因此在
中选择相同的行另一个网格。

我宁愿没有两个包含相同数据的单独来源,因为
通常会有数千行。

有什么方法可以解决这个问题。 ?

- 欢呼,

elziko



>我从来没有这样做,但你是否用你的数据集副本来试试

dim mynewdataset = myolddataset.copy




正如我所说的我''而不是没有两个单独的来源包含相同的数据

因为

通常有数千行,因为这会浪费

$。$ / b $

干杯,
/ BLOCKQUOTE>

I have to DataGrids each sharing the same DataSource. The user wants to be
able to select a different row in each grid but since they share the same
source when a row is selected in one grid the same row gets selected in the
other grid.

I''d rather not have two seperate sources containing the same data since
there is often many thousands of rows.

Is there any way around this?

--

Cheers,

elziko

解决方案

Hi Elziko,

I never did this, however did you try it with a copy of your dataset
dim mynewdataset = myolddataset.copy

http://msdn.microsoft.com/library/de...scopytopic.asp

I hope this helps?

Cor


Create a dataview for each one, even if it''s the same table... then bind
each grid to the different dataview.
"elziko" <el****@NOTSPAMMINGyahoo.co.uk> wrote in message
news:Oy**************@TK2MSFTNGP10.phx.gbl...

I have to DataGrids each sharing the same DataSource. The user wants to be
able to select a different row in each grid but since they share the same
source when a row is selected in one grid the same row gets selected in the other grid.

I''d rather not have two seperate sources containing the same data since
there is often many thousands of rows.

Is there any way around this?

--

Cheers,

elziko



> I never did this, however did you try it with a copy of your dataset

dim mynewdataset = myolddataset.copy



As I said I''d rather not have two seperate sources containing the same data
since
there is often many thousands of rows because this would be a waste of
memory.

--

Cheers,

elziko


这篇关于两个DataGrids,相同的DataSource的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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