The option of manually adding the “All” entry is the fastest and easiest.
There is a more complicated option - create a heir ComboBox , which when you change the collection of elements adds "Everything" automatically.
You, unfortunately, still torment WinForm , I don’t remember ready solutions in it right away.
The solution to the forehead is simple:
public class ComboBoxWithAll : ComboBox { public ComboBoxWithAll() { this.BindingContextChanged += OnBindingContextChanged; } private void OnBindingContextChanged(object sender, EventArgs args) { var item = "Все"; var list = this.DataSource as List<string>; if (list != null && list.Any() && list[0] != item) { list.Insert(0, item); } OnDataSourceChanged(args); } }
But it should be borne in mind that I made explicit strings to the DataSource type here and I change it, which in principle should never be done by controls.
If this does not suit you, then you need to bother even more, with the division into a real collection and a displayed one, and then you should add a sign that the "All" item is selected.
Listsimply adding an All element to the beginning? - ExiD