c# - How to select ComboBox value after Data filled from DataSource -


I want to set the selected value for a known value. However, after the InititializeComponent () is called, the data is not yet filled in a datable limb, so I can not set the value I selected.

Which incident has started since the data has been added to the debugband object in the cumbobox? Is there any other way you would suggest handling it?

Many thanks to

You incurred a combobox

Datasource switch

But if you do this then you must first set DisplayMember and ValueMember or you can not use the combo box. Selected value

  comboBox1.DisplayMember = "name"; ComboBox1.ValueMember = "id"; ComboBox1.DataSource = DataTable;  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -