Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i have a query like this.




in this query can i change one column as combobox?

What I have tried:

<pre> Sub YEN()
        Dim ds As New DataSet
        Dim da As New OleDbDataAdapter
        Dim dt As New System.Data.DataTable
        CN_AC()
                      sorgu = "SELECT * FROM PERTTPDKS"
            End If
            da = New OleDb.OleDbDataAdapter(sorgu, cn_oracle)
            da.Fill(dt)
            .DataSource = dt.DefaultView
            ' ds = New DataSet()
            'da.Fill(ds, "ST")
            ' .DataSource = ds.Tables("ST").DefaultView

        End With
        CN_KAPA()


    End Sub
Posted
Updated 22-May-21 22:57pm

 
Share this answer
 
v2
Following are couple of documented examples for the same:
DataGridViewComboBoxColumn Class (System.Windows.Forms) | Microsoft Docs[^]
DataGridViewComboBoxColumn example in Windows Application using C# and VB.Net[^]

Based on it, high level, following are the steps:
1. Populating the DataGridView
2. Adding the ComboBox to DataGridView
3. Adding default item to the ComboBox
4. Populating the ComboBox

Try!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900