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 1375278.jpg](https://www.computerhelp.forum/data/attachments/55/55726-ee211e37568d3f8f671c2946931e9be0.jpg?hash=7iEeN1aNP4)
And this is what i am looking for in a combobox
![1375279.jpg 1375279.jpg](https://www.computerhelp.forum/data/attachments/55/55727-f4d6aa274515f05a3875bf130c06fadb.jpg?hash=9NaqJ0UV8F)
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...
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 1375278.jpg](https://www.computerhelp.forum/data/attachments/55/55726-ee211e37568d3f8f671c2946931e9be0.jpg?hash=7iEeN1aNP4)
And this is what i am looking for in a combobox
![1375279.jpg 1375279.jpg](https://www.computerhelp.forum/data/attachments/55/55727-f4d6aa274515f05a3875bf130c06fadb.jpg?hash=9NaqJ0UV8F)
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...