Hi All,
I am able to select to display data in a datagridview. My code:
Public Sub ShowData()
If conn.State = ConnectionState.Closed Then conn.Open()
cmd = New SqlCommand("SELECT * FROM ClientPlan", conn)
myDA = New SqlDataAdapter(cmd)
myDataSet = New DataSet()
myDA.Fill(myDataSet, "ClientPlan")
DGV.DataSource = myDataSet.Tables("clientplan").DefaultView
End Sub
This code works perfectly fine for displaying my data in the DGV.
However , i would now like to have a combo box column in my DGV.
I want to populate my DGV combo box with data from a table in the database.
(I used cb1.item.add for normal/non DGV combo boxes, but i don't know how to implement it for DGV combo boxes.)
For example -
Column Name : Plans
Items in the Combobox : Plan A, Plan B, Plan C (All in the database)
Can anyone tell me how i can get this to work?
I am coding in Visual Studio 2005(VB.NET exclusive) and working with MS SQL database.
Thanks,
gnxc