I do not know the .Data property for the BindingSource object, but there is a .DataSource property that can be set to null:
bindingSource.DataSource = null;
This frees the data binding source. However, looking at the link for BindingSource.DataSource :
DataSource property List results ---------------------------- ------------------------------------------- null with DataMember set Not supported, raises ArgumentException.
If you use DataMember, you cannot set the DataSource to null without exception.
Unfortunately, I do not know if your workaround is the appropriate way, but at least now we know that you cannot just bind to null when the DataMember is set.
source share