I want to know how to set the value of a DataGridViewComboBox cell. I already bind the DataGridViewComboBox with DataSource. But I want to set new value to this this datasou
This worked for me
dim dt as datatable
dt=fillMydata() 'do your function
'dt has 2 col myId as myDescription
Dim col As DataGridViewComboBoxColumn
col = New DataGridViewComboBoxColumn
col.HeaderText = "MyHeader"
col.Name = "Myname"
col.DataSource = data '
col.DisplayMember = "myDescription"
col.ValueMember = "myId"
col.DropDownWidth = 240
''''''''''''''''''''''''''''''''''''''''''''''
'set the value
col.DefaultCellStyle.NullValue = dt.Rows(0).Item("myDescription").ToString
''''''''''''''''''''''''''''''''''''''''''''''
DataGridView1.Columns.Add(col)
hope this help