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

Posted on 2011-10-05
Last Modified: 2012-05-12
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
The next row will have different values for the list in col 0

how can I make use of the myDataGridView.Rows.Add() method?
Question by:g_johnson
    LVL 83

    Expert Comment

    LVL 4

    Author Comment

    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?
    LVL 83

    Accepted Solution

    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
    LVL 4

    Author Comment

    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!

    LVL 83

    Expert Comment

    Glad to help :-)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    Title # Comments Views Activity
    Set the Tab Order on Windows Forms 2 22
    How to parse date from file path? 4 31
    Wordmerge 8 30
    Starting to learn JAVA, 7 34
    Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now