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 8982683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:38:28+00:00 2026-06-15T20:38:28+00:00

I know you can use the BindingSource object with a DataGridView. Is it possible

  • 0

I know you can use the BindingSource object with a DataGridView.

Is it possible to have a combo box in one of the columns and still take advantage of the BindingSource?

  • 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-06-15T20:38:30+00:00Added an answer on June 15, 2026 at 8:38 pm

    Yes, it is – take a look at ComboBox with DataGridView in C#:

    Using ComboBox with DataGridView is not that complex anymore but it’s almost mandatory while doing some data driven software development.

    enter image description here

    I have created a DataGridView like this one. Now, I want to show “Month” and “Item” instead of “MonthID” and “ItemID” in DataGridView.

    Essentially what the article describes is binding the comboboxes with a separate binding source – in this case, a validation table, where MonthID and MonthName are stored, and the month name is displayed based on the id from the original data.

    Here he sets up the Month data source, selecting from a month table, and then creates a BindingSource from the returned data.

    //Month Data Source
    string selectQueryStringMonth = "SELECT MonthID,MonthText FROM Table_Month";
    SqlDataAdapter sqlDataAdapterMonth = new SqlDataAdapter(selectQueryStringMonth, sqlConnection);
    SqlCommandBuilder sqlCommandBuilderMonth = new SqlCommandBuilder(sqlDataAdapterMonth);
    DataTable dataTableMonth= new DataTable();
    sqlDataAdapterMonth.Fill(dataTableMonth);
    BindingSource bindingSourceMonth = new BindingSource();
    bindingSourceMonth.DataSource = dataTableMonth;
    

    Then he adds the month ComboBoxColumn to the DataGridView, using the DataSource as the BindingSource created above:

    //Adding  Month Combo
    DataGridViewComboBoxColumn ColumnMonth = new DataGridViewComboBoxColumn();
    ColumnMonth.DataPropertyName = "MonthID";
    ColumnMonth.HeaderText = "Month";
    ColumnMonth.Width = 120;
    ColumnMonth.DataSource = bindingSourceMonth;
    ColumnMonth.ValueMember = "MonthID";
    ColumnMonth.DisplayMember = "MonthText";
    dataGridViewComboTrial.Columns.Add(ColumnMonth);
    

    And then finally, he binds the DataGridView to the original data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know one can use '<alt><shift>J' to create tags for a single code element
I know that one can use Pry to see what a model in composed
I know one can use interceptors before a method call by using the @AroundInvoke
I know I can use codes to add UITableView one by one. [self.view addSubview:tableview1];//
I know you can use Microsoft Speech Object Library for asp.net sites. But does
I know I can use a LinearLayout to do this, but I have to
I know you can use .find to find td:contains('text') , but if I have
I know I can use the -n flag in git grep to show the
I know you can use -fno-objc-arc flag to disable ARC for files that NOT
I know I can use install-data-hook to do anything I want after my data

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.