Code:
Private Sub DGVColumnHeader_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.DataGridView1.DataSource = Me.bs
Dim i As Integer = -1
DataGridView1.Columns.Add("Name", "Product Name")
DataGridView1.Columns.Add("Description", "Description")
DataGridView1.Columns.Add("Price", "Price")
'---create a new bindingsource control---
Dim bindingsource As New BindingSource
'---add the items into the control---
bindingsource.Add("Type A")
bindingsource.Add("Type B")
bindingsource.Add("Type C")
Dim myDataGridViewComboBox As New DataGridViewComboBoxCell
myDataGridViewComboBox.Items.Add("Item 1")
myDataGridViewComboBox.Items.Add("Item 2")
myDataGridViewComboBox.Items.Add("Item 3")
'Me.DataGridView1(-1,1)=myDataGridViewComboBox//errorIndex was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Comment