I have an excel file which has two columns (1. Name and 2. Value) which I want to bind to a ComboBox.
When I set the DisplayMember to name it s
DisplayMember
You can assign value for ValueMember of combo box.
OleDbDataAdapter da = new OleDbDataAdapter("SELECT [name],[value] FROM [Sheet1$] where Component=1 ", strConn); comboBox1.DisplayMember = "name"; comboBox1.ValueMember = "value"; comboBox1.BindingContext = this.BindingContext;
HTH.