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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

databound combobox

Thread ID:




528 Jul 3,2002 10:04 AM UTC WinForms 0
Tags: FAQ
Andrew Guy
Asked On July 3, 2002 10:04 AM UTC

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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon