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

  • SEARCH
  • Home
  • 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 7019851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:14:22+00:00 2026-05-27T23:14:22+00:00

suppose i have one datagridview and datagridview has one DataGridViewComboBoxColumn. i have populate datagridview

  • 0

suppose i have one datagridview and datagridview has one DataGridViewComboBoxColumn.
i have populate datagridview combobox column with country name and code.

so now i want that when i am reading datagridview cell value in for loop then i want get DataGridViewComboBoxColumn selected value and text. i could not get the value but not being able to get display text from DataGridViewComboBoxColumn in for loop.

if it is possible then plzz help me with small code.

private void button1_Click(object sender, EventArgs e)
    {
        for (int i = 0; i <= dgList.Rows.Count - 1; i++)
        {
            DataGridViewComboBoxCell cell = dgList.Rows[i].Cells[0] as DataGridViewComboBoxCell;
            int index = cell == null || cell.Value == null ? -1 : cell.Items.IndexOf(cell.Value);
            string strVal = cell.Value.ToString();
        }
    }

thanks

  • 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-27T23:14:22+00:00Added an answer on May 27, 2026 at 11:14 pm

    Can you try accessing the values like FormattedValue and Value, this should give you the two values.

    I had tried using a Dictionary<string,string> as DataSource and using the above properties i was able to get both the values.

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

Sidebar

Related Questions

Suppose I have two tables that are linked (one has a foreign key to
suppose i have one dowpdown in master page and i want that when user
Suppose I have one table table1 and another table table2. Both has same column
Suppose I have one long long int and want to take its bits and
Suppose we have an iterator (an infinite one) that returns lists (or finite iterators),
Suppose I have a process which spawns exactly one child process. Now when the
suppose i have one div and div has img tag like <div><img src='img1.png'/></div> so
suppose i have one column in mysql database which is stated last time one
Suppose i have one website with simple pages in php like page1.php page2.php Now
Suppose i have one simple function in my program. Whenever i call that function

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.