I am trying to empty all items from my ComboBox. I cant seem to clear the list.
I am filling the box from an ArrayList of strings. This is running on Windows CE 5.0 and written in C#.
To remove all items from Combo or Array List. Wwhich list are you removing items from?
Code:
// Add 2 Items to array list
arrayList.Add("Item 1");
arrayList.Add("Item 2");
remove 2 items
arrayList.RemoveRange(0, arrayList.Count);
// remove all from combo
CmbList.Items.Clear();
// you could also rebind to the empty arrayList (i think)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.