清除列表视图而不删除 VB.Net 中的列?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18958770/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Clearing list view without deleting columns in VB.Net?
提问by user2765899
I need help regarding list view. I'm trying to remove the records in my list view but when I try to use lvRecords.Clear() it also removes the columns that I need. I just need to clear the records not the columns. :(
我需要有关列表视图的帮助。我正在尝试删除列表视图中的记录,但是当我尝试使用 lvRecords.Clear() 时,它也会删除我需要的列。我只需要清除记录而不是列。:(
回答by Steven Doggart
回答by Steve
Put the column setup in a separate method and then once you clear it call the setup method
将列设置放在单独的方法中,然后清除它后调用设置方法

