Gridview重复删除。 [英] Gridview Duplicate removal.

查看:69
本文介绍了Gridview重复删除。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


如果数据集已经填充了

,我将如何删除重复的行?


检查每一行并删除重复项的最佳方法是什么?

留下至少一个重复行的唯一一个?


任何想法?


提前致谢,


J

解决方案

糟糕,


我的主题可能会产生误导。让我澄清一下。


我的asp.net 2.0站点中的gridview是由数据集填充而不是
数据源。


谢谢,


j


< wa ******** @ newsgroups.nospam>写在消息

新闻:uo ************** @ TK2MSFTNGP14.phx.gbl ...

你好,
如何在数据集已经填充后从数据集中删除重复的行?

检查每一行并删除重复项的最佳方法是什么? >留下至少一个独特的重复行?

任何想法?

提前致谢,

J


有没有人知道我应该怎么做?


J


< ; WA ******** @ newsgroups.nospam>在消息中写道

news:eN ************** @ TK2MSFTNGP15.phx.gbl ...

哎呀,

我的主题可能会误导。让我澄清一下。

我的asp.net 2.0网站中的gridview是由数据集填充而不是
数据源。

谢谢,

j

< wa ******** @ newsgroups.nospam>在消息中写道
新闻:uo ************** @ TK2MSFTNGP14.phx.gbl ...

你好,
如何在数据集已经填充之后从数据集中删除重复的行?

什么是检查每一行并删除重复项的最佳方法,同时至少离开一个独特的重复行?

任何想法?

提前致谢,

J




你好J,


感谢你发帖!


对于当前问题,我想在

数据库层或数据集层中遇到重复的行?


在数据集层中,没有存在的方法删除重复的

行。由于存在许多重复的行,例如重复的主键,

或重复的一列,我认为您可以编写自己的方法,以便在数据集层中实现它。 br />

感谢您的理解!


问候,


元人[MSFT]
Microsoft在线支持


Hello,

How would I remove duplicate rows from a dataset after it has already been
populated?

What would be the best way to check each row and delete duplicates while
leaving at least one unique of the duplicate rows?

Any Ideas?

Thanks in advance,

J

解决方案

Oops,

My subject was probably misleading. Let me clarify.

My gridview in my asp.net 2.0 site is populated by a dataset not a
datasource.

Thanks,

j

<wa********@newsgroups.nospam> wrote in message
news:uo**************@TK2MSFTNGP14.phx.gbl...

Hello,

How would I remove duplicate rows from a dataset after it has already been
populated?

What would be the best way to check each row and delete duplicates while
leaving at least one unique of the duplicate rows?

Any Ideas?

Thanks in advance,

J



Does anyone have any idea on how I should do this?

J

<wa********@newsgroups.nospam> wrote in message
news:eN**************@TK2MSFTNGP15.phx.gbl...

Oops,

My subject was probably misleading. Let me clarify.

My gridview in my asp.net 2.0 site is populated by a dataset not a
datasource.

Thanks,

j

<wa********@newsgroups.nospam> wrote in message
news:uo**************@TK2MSFTNGP14.phx.gbl...

Hello,

How would I remove duplicate rows from a dataset after it has already
been populated?

What would be the best way to check each row and delete duplicates while
leaving at least one unique of the duplicate rows?

Any Ideas?

Thanks in advance,

J




Hi J,

Thanks for posting!

For the current issue, I wonder the duplicated row is encountered in the
data base layer or the dataset layer?

In the dataset layer, there is not existed method to delete the duplicated
row. Since there are many duplicated rows such like duplicated primary key,
or duplicated one column, I think you can write your own method to
implement it in the dataset layer.

Thanks for your understanding!

Regards,

Yuan Ren [MSFT]
Microsoft Online Support


这篇关于Gridview重复删除。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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