سؤال

Is it possible to set a DataGridViewComboBox to allow a user to clear an entry when it is bound to a datasource such as a BindingList?

If so, how might that be achieved?

هل كانت مفيدة؟

المحلول

Typically I add an entry to the binding list or datasource that represents a blank entry. So what I've done in the past is added a row to my datatable that has an ID of -1 and a value of " " for example, then just handle the saving code to set that value to NULL in the database.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top