From datagridview Column to combobox

  • Thread starter Thread starter KeesBlunder
  • Start date Start date
K

KeesBlunder

Guest
Hello,

Is it possible to get all items from a datagridview Column ( from 1 to 6 items) to a combobox ?

I fill the datagridview from a sqlce database.

How do i get this to work , via datagridview or directly from the database .

The Column name is Product

1375278.jpg

And this is what i am looking for in a combobox

1375279.jpg

i fill the datagridview with this.

cmd = New SqlCeCommand("SELECT Id, Product, Jaar FROM Cijfers WHERE Reisnr ='" & Reisnr.Text & "'", con)
If con.State = ConnectionState.Closed Then con.Open()
myDA = New SqlCeDataAdapter(cmd)
myDataSet = New DataSet()
myDA.Fill(myDataSet, "MyTable")
DataGridView1.DataSource = myDataSet.Tables("MyTable").DefaultView
If con.State = ConnectionState.Open Then con.Close()

Continue reading...
 
Back
Top