// This function populates the listview public void populateListView(string name) { CountryLV.Items.Clear(); Buffer = new List <Country>(); CTree.GetNodesLike(name, ref Buffer); Buffer.ForEach(item => CreateListViewItem(CountryLV, item)); }