• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 383
  • Last Modified:

VB.Net adding a row with a combox column to a datagridview object unbound

I am using an unbound datagridview in VB.Net

It consists of several columns, the first of which is of the type datagridviewcomboboxcolumn.

the values I want to add to a row are:
some list for col 0
"ab"
"cde"
"efg"
 
The next row will have different values for the list in col 0

how can I make use of the myDataGridView.Rows.Add() method?
0
g_johnson
Asked:
g_johnson
  • 3
  • 2
1 Solution
 
CodeCruiserCommented:
0
 
g_johnsonAuthor Commented:
This seems to add a column such that all rows have the same values in the combobox.

Maybe the answer is that you can't have different values in the combobox for each row.  Do you think that's the case?
0
 
CodeCruiserCommented:
That is the case when you add the combobox column. If you want different values, you need to add a combobox to the cell your self

http://www.sommergyll.com/datagridview-usercontrols/datagridview-with-combobox.htm
0
 
g_johnsonAuthor Commented:
Thank you.  There was a line of code in there that wouldn't compile, but I eventually figured out that it wasn't needed.  I now have this working, and I very much appreciate your help!

0
 
CodeCruiserCommented:
Glad to help :-)
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now