Listview子项重复 [英] Listview subitems duplication

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

问题描述

您好,有没有办法删除listview子项中的重复项?我在网上看到的只删除第一列的重复项。拜托,帮帮我吧。我正在使用visual basic

Hello, is there any way to delete duplicates in listview subitems? The one i saw online only remove duplicates from first column. Please, help me out. I am using visual basic

推荐答案

如果您通过手动添加listitems创建列表视图,那么显然如何有选择地删除listitems。



但是,正如@Sergey Alexandrovich Kryukov指出的那样:

为什么不首先避免重复。



您可以根据字段值修改查询以包含行或排除它们。然后将生成的对象传递给listview,无需再进一步修改listview。



您还可以查看listview类以查看可用的方法以编程方式删除listitem或引用它们。
If you're creating a listview by manually adding the listitems, then it's obvious how to selectively remove listitems.

But, as @Sergey Alexandrovich Kryukov points out:
why not avoid duplicates in the first place.

You can modify your query to include rows or exclude them, based on field values. Then pass the resulting object to the listview, eliminating the need to modify the listview any further.

You can also look at the listview class to see what methods are available for deleting a listitem programmatically or referencing them.


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

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