We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

databound combobox

Hi, I have an app that succesfully populates a combobox with a list of countries using a dataset and setting the .datasource and .displaymember properties. I have now set that combo box to be databound to a SQL Server table using: myCombo.DataBindings.Add("SelectedValue", dsMyDataSet.Tables(0), "fieldName") This works okay but if the record I'm editing/viewing has a NULL value for "fieldName" then I get the following useful message: "Additional information: Can't set the SelectedValue in a ListControl with empty ValueMember." I understand teh problem but how do deal with blank/null fields that are bound to combo/list boxes? All help appreciated. Thanks Andrew

Loader.
Live Chat Icon For mobile
Up arrow icon