Add 3 columns from database to ComboBox
-
How to Add 3 columns from database to ComboBox, I want to visible 2 of them I use this
reader = OleDbCommand1.ExecuteReader()
Dim dt = New System.Data.DataTable()
dt.Load(reader)
ComboBox2.DataSource = dt
ComboBox2.DisplayMember = "column1"
ComboBox2.ValueMember = "column3"
ComboBox2.SelectedIndex = -1
reader.Close()this work but can I use this
ComboBox2.DisplayMember = "column1" + "column2"
-
How to Add 3 columns from database to ComboBox, I want to visible 2 of them I use this
reader = OleDbCommand1.ExecuteReader()
Dim dt = New System.Data.DataTable()
dt.Load(reader)
ComboBox2.DataSource = dt
ComboBox2.DisplayMember = "column1"
ComboBox2.ValueMember = "column3"
ComboBox2.SelectedIndex = -1
reader.Close()this work but can I use this
ComboBox2.DisplayMember = "column1" + "column2"
in a nutshell you have create a custom class from combobox to do it have a read of this Multiple columns combo box vb.net[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch