Click here to Skip to main content
15,891,708 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have load data on my datagridview by using this command :


VB
Public Sub loadRepairDG()
     Dim dtDGloadRepair

     conn = GetConnect()
     Try
         da = New SqlDataAdapter("SELECT * from V_RepairInv", conn)
         ds = New DataSet()
         da.Fill(ds, "V_RepairInv")
         dtDGloadRepair = ds.Tables("V_RepairInv")
         frmRepair.DataGridViewX1.DataSource = dtDGloadRepair
     Catch ex As Exception
         MsgBox("Error: " & ex.Source & ": " & ex.Message, MsgBoxStyle.OkOnly, "Error conection!!")
     End Try
     conn.Close()
 End Sub

This above code, works fine. But then I want to modify the datagrid columns to combobox. Transform it into more dynamic grid.

Some forum I've read put code like this:

VB
DatagridviewComboColumn.column.Add("1")

But it adds column, I want to modify current column from textbox to combobox.
How can i possibly do that. And also is it possible to link the grid combobox to other table while the grid is linked to other one?
Posted
Updated 8-Aug-14 1:26am
v2
Comments
Maciej Los 8-Aug-14 7:25am    
What kind of gridview? WinForm? WebControl?
guardj 9-Aug-14 7:28am    
WinForm.

1 solution

Please, read my comment to the question.

WinForms: DataGridViewComboBoxColumn Class[^]
 
Share this answer
 
Comments
guardj 14-Aug-14 6:56am    
Yes, Ive seen this one but, what Im trying to get is.. in every column is it possible to have different dataset.
Maciej Los 14-Aug-14 9:23am    
"Seeing" is not equal to "doing". What have you tried so far? Where are you stuck?
guardj 14-Aug-14 21:37pm    
Im stuck o the part were I want to connect every column of combobox to a different tables in sql

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