C# Clear all items in ListView

前端 未结 12 1911
我在风中等你
我在风中等你 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:46

    Probably your code works but it is rebound somewhere after you clear it. Make sure that this it not the case. It will be more helpful if you provide some code. Where are you setting your data source? Where are you data binding? Where are you clearing the list?

提交回复
热议问题