Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7598533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:25:46+00:00 2026-05-30T22:25:46+00:00

I currently have a 2-column wide DataGridView, the first column being a DataGridViewTextBoxColumn and

  • 0

I currently have a 2-column wide DataGridView, the first column being a DataGridViewTextBoxColumn and the second a DataGridViewComboBoxColumn. I also have a pre-generated generic List (string) that is to be used as the DataSource for the DataGridViewComboBox for each row.

Finally, I have a loop that iterates through a series of strings and parses them accordingly, with extracted values being applied to respective cells using an as shown below:

dataGridView.Rows.Add("Column1Text", "Column2Text");

The gridview data is filled as expected, along with the DataGridViewComboBox properly displaying the ideal item.

The problem is, the DataGridViewComboBox, when clicked, does not drop down any items. I have checked that the DataGridViewComboBox contains items. The DataGridViewTextBoxColumn’s AutoSizeMode is set to “Fill” if it’s of any relevance.

Any insight as to what I may be doing wrong? Do I have to manually drop down the items when a given cell is clicked? Thanks.

Update

I have tried two different methods in terms of binding the generic list as the DataSource.

The first was binding the DataSource of the entire column itself via:

col_key.DataSource = KeyList;

The second method was binding the DataSource of each new DataGridViewComboBoxCell in the corresponding row:

(DataGridViewComboBoxCell)(row.Cells[1]).DataSource = KeyList;

Both of these methods compile and properly add the necessary items at runtime, but no items drop down when clicked.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T22:25:48+00:00Added an answer on May 30, 2026 at 10:25 pm

    To fill a grid combocolumn, you should treat it as regular Combo, datasource for combo should have a valuemember and a displaymember, so check the following example :

    //Coded by Amen Ayach's DataClassBuilder @26/02/2012
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    
    public class iddesc{
    
        private int _id;
        public int id{
            get {
                return _id;
            }
            set {
                _id = value;
            }
        }
    
        private string _description;
        public string description{
            get {
                return _description;
            }
            set {
                _description = value;
            }
        }
    
    }
    

    To fill the grid :

        private void FillData()
        {
            List<iddesc> DataList = new List<iddesc>();
            for (int i = 1; i < 11; i++)
            {
                DataList.Add(new iddesc() { id = i, description = "Desc" + i.ToString() });
            }
            ComboCol.ValueMember = "id";
            ComboCol.DisplayMember = "description";
            ComboCol.DataSource = DataList;
    
            for (int i = 0; i < 10; i++)
            {
                grd.Rows.Add();
                grd[ComboCol.Name, i].Value = DataList[i].id;//Here you deliver the valuemember
                grd[Column1.Name, i].Value = DataList[i].description;
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a Postgres 8.4 database that contains a varchar(10000) column. I'd like
I currently have a table which only has a single editable column. I have
I have an application in which I'm currently using a two column table in
currently we have a column with only integer values declared as NUMBER. At the
I currently have a table that is 17 columns wide and has 30 records.
Currently I have a column that is declared as a NUMBER. I want to
I currently have a model Attend that will have a status column, and this
I am doing a database migration and I currently have a string column with
I currently have a MySQL table called _post and i have a column called
I currently have a two column layout with a header and a footer, the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.