清除ListView而不会丢失组 [英] Clear ListView without losing groups

查看:78
本文介绍了清除ListView而不会丢失组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过TextBox的输入过滤ListView。根据场景,我的ListView被分成几组,一旦我清除ListView的Items集合以准备加载已过滤的列表 - 不是ListView的组,而是每个ListViewItem的组分配,我将失去这些组。

即使在调用Clear()函数后,有没有办法在ListViewItems中保留该信息?

I want to filter a ListView going by a TextBox's input. Depending on the scenario, my ListView is divided into groups, which I lose once I Clear out the ListView's Items collection in preparation of loading the filtered list - not the ListView's Groups, but the Group allocation for each ListViewItem.
Is there any way to preserve that information in the ListViewItems even after calling the Clear() function?

推荐答案

http://stackoverflow.com/questions/7776887/how-to-clear -all-groups-and-items-in-listview-control [ ^ ]


这篇关于清除ListView而不会丢失组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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