gpt4 book ai didi

vb.net - 清除 ListView 而不删除VB.Net中的列?

转载 作者:行者123 更新时间:2023-12-04 17:22:28 24 4
gpt4 key购买 nike

我需要有关 ListView 的帮助。我正在尝试删除 ListView 中的记录,但是当我尝试使用lvRecords.Clear()时,它也会同时删除我需要的列。我只需要清除记录而不是列。 :(

最佳答案

根据MSDNListView.Clear方法

Removes all items and columns from the control.



要仅清除项目,您需要在 Clear属性上调用 Items方法。尝试以下方法:
lvRecords.Items.Clear

关于vb.net - 清除 ListView 而不删除VB.Net中的列?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18958770/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com