I want to bind the value of cells in one column to another column in a datagridview. The 1st column is Team and the other is Assignment. I want to set the the selected value (Assignment.Value; teamComboBox.ValueMember ) = (Team.Value; row.Cells.Item(6)) after the dgv is loaded.
This is what I have so far:
Dim conn As New SqlConnection(My.Resources.FCLRptConn)
Dim cmd As New SqlCommand("spFCLLUVTeamAssignment", conn)
Dim da As New SqlDataAdapter(cmd)
Dim TeamAssign As New DataTable
da.Fill(TeamAssign)
With FCLTeam
.DataPropertyName = "FCLTeam"
.Name = "FCLTeam"
.DataSource = TeamAssign
.DisplayMember = "FCLTeamName"
.ValueMember = "FCLTeamID"
.AutoSizeMode = DataGridViewAutoSizeColumnsMode.DisplayedCells
.DisplayIndex = 6
End With
I now have 2 columns appearing in the DGV. One is from the dataset and the other is the datagridcomboboxcolumn that I added.
How would I show only the datagridcomboboxcolumn ?