Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

First line in a combo box replaced by system.data.datarowview

I have a copbo box which loads everything OK, but after the first click on the combo the first entry is replaced with system.data.datarowview unless you click on the first item in which case it stays OK.

Any ideas?
0
grwallace
Asked:
grwallace
  • 4
  • 2
1 Solution
 
käµfm³d 👽Commented:
What does the code to load the ComboBox look like?
0
 
grwallaceAuthor Commented:
The datasource, displaymember & valuemember are set at design time - there are no assignments in code

The datssource is set as a bindingsource and the selecteditem and selectedvalue are set to fields from the bindingsource, as are in valuemember & displaymember fields.
0
 
käµfm³d 👽Commented:
What does the DisplayMember declaration look like?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
grwallaceAuthor Commented:
It is Description1, a field which is picked from the DisplayMember dropdown which shows the table to which the Bindingsource is bound
0
 
grwallaceAuthor Commented:
The problem was cured by setting the SelectedItem in the Databindings section to None, and the SelectedValue field set to the Id of the table which I was looking to return.

That solved the problem
0
 
grwallaceAuthor Commented:
I found my own solution
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now