C# Clear all items in ListView

前端 未结 12 1880
我在风中等你
我在风中等你 2020-12-03 13:39

I try to clear my listview but the clear method doesn\'t work:

myListView.Items.Clear();

This doen\'t work. When i put a breakpoint at this

12条回答
  •  渐次进展
    2020-12-03 13:48

    Just use the clear method is works like a charm. ListView1.Items.Clear() i think if its not working it may be the position whereby you place this code. Also can try nullifying the datasource.

提交回复
热议问题