View Single Post
  #2 (permalink)  
Old 07-06-2009, 3:30 PM
JohnH's Avatar
JohnH JohnH is offline
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Dec 2005
Location: Norway
Age: 37
Posts: 10,304
Reputation: 1315
JohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond repute
Default

Quote:
Dim combocell As DataGridViewComboBoxCell = dgvM.Rows(i).Cells(COL_FOLJER)
The error message says that Cells(COL_FOLJER) is a DataGridViewTextBoxCell, not a DataGridViewComboBoxCell.

You haven't changed cell type in your code anywhere, this is how:
Code:
Dim cell As New DataGridViewComboBoxCell
cell.Items.Add("A")
cell.Items.Add("B")
Me.DataGridView1.Item(col, row) = cell
__________________
Reply With Quote