Answer the question
In order to leave comments, you need to log in
How to remove the added row when adding an empty DataSource to the BindingSource?
If BindingSource.DataSource is assigned an empty list, then an empty string is added. How to make it not added? AllowNew is false;
So far I've done this:
var items = GetItems();
bindingSource.DataSource = items.Count > 0 ? items : (object) typeof(Item);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question