I have the following code, which basically takes values from a database and populates a listview.
using (IDataReader reader = cmd.ExecuteReader()) {
Like this:
try { lvwMyList.BeginUpdate(); //bla bla bla } finally { lvwMyList.EndUpdate(); }
Make sure that you invoke lvwMyList.Items.Clear() after BeginUpdate if you want to clear the list before filling it.
lvwMyList.Items.Clear()
BeginUpdate