Winform combobox binding and setting default value with selected index -


i have case databatable datasource combobox , datatatable records change user selects field. want set default value in combobox when database has 1 record. works when write

cmblist.items.count > 0  cmblist.selectedindex = 0  

but loses focus goes blank. seems setting selectedindex 0 not update bindingsource values.

what's solution please


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -