如何避免在gridview中显示重复的值 [英] how to avoid displaying duplicate values in gridview

查看:134
本文介绍了如何避免在gridview中显示重复的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个没有主键的表,并且在gridview中显示所有记录.在这种情况下,我想避免在gridview中重复记录.我该怎么做?任何人都可以帮忙吗?

I have a table without primary key and I am displaying all records in gridview. In this case I want to avoid duplicate records in gridview. How can I do it? Can anyone help?

推荐答案

最好通过查询本身获取distinct 组记录.

但是,如果您仍然想从网格中执行此操作,请参见此处 [
It would be best to fetch a distinct set of records via the query itself.

If you still want to do this from the grid, however, then see here[^].


这篇关于如何避免在gridview中显示重复的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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