I am using VB.net 2005.
I have a DataGridView with several columns. One of the columns is a ComboBox. What I want to happen is when I populate the DataGridView by binding it with the DataTable I want the ComboBox item that is in the DataTable field to be the one that is shown as selected in the drop down. Then if the user wants to change the value they select a different one from the DropDown (and I will perform some update action). My code displays the correct DataTable item in the ComboBox, but the ComboBox will not drop down so a different item can be selected. What am I doing wrong? Here is the code.
This is the code where I set up the ComboBox in the Form_Load and add all the possible items that can be in the DataTable field.
c10 = New DataGridViewComboBoxColumn
c10.Name = "Destination"
c10.DataPropertyName = "Destination"
c10.MaxDropDownItems = 5
c10.Items.Add("Dane Or Auto")
c10.DisplayStyle = DataGridViewComboBoxDisplayStyle.DropDownButton
' So you only have to click the ComboBox one time to get it to dropdown
Me.dgvQueue.EditMode = DataGridViewEditMode.EditOnEnter
dgvQueue.AutoGenerateColumns = False
I then bind the DataGridView to my DataTable and everything populates. The ComboBox column shows the correctly selected item (the value of the Destination field that is in the DataTable), but when I click the drop down arrow nothing happens - it will not drop down to display the values I loaded in the form_load. How do I fix this?