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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:36:12+00:00 2026-05-26T03:36:12+00:00

I am currently trying to complete a form with a grid that is loaded

  • 0

I am currently trying to complete a form with a grid that is loaded programmatically.

The grid has 6 columns and the last column is a ComboBox

This is part of the code

foreach(var persona in asistenciaRepo.FilterBy(x => x.plaserv == planilla).OrderBy(x => x.orden))
{
  grilla_personal.Rows.Add(persona.personal.id, persona.personal.id_legajo, persona.jerarquia.descripcion, persona.personal.nomyape, persona.orden, persona.codificacion.descripcion);
}

Basically what I’m trying is that when the grid is loaded and displays the selection combobox stored in my entity

the persona.codificacion.descripcion is the column of my entity that contains the data you wish to link to my control.

It is necessary to handle the event SelectedValueChanged or what is the way to do it correctly.

[UPDATE]

Column 6 is loaded programmatically

foreach (var c in codifRepo.GetAll())
{
   codificacion.Items.Add(c);
}
codificacion.ValueMember = "id";
codificacion.DisplayMember = "descripcion";

codificacion is the name of the ComboBoxColumn

  • 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-26T03:36:12+00:00Added an answer on May 26, 2026 at 3:36 am

    Your DataGridViewComboBoxColumn needs to have its DataPropertyName property set.

    This tells the column what property in the DataGridView’s datasource to use to get each comboboxes selected value.

    You will also need to have provided a DataSource for the combobox column itself, which specifies the list of values in the drop down.

    The columns ValueMember and DisplayMember properties need to be set too. ValueMember is the property in the column’s datasource that matches the DataPropertyName property. DisplayMember is the property to display to users.


    If you aren’t using a datasource for the grid, I’d strongly recommend it – add each row’s values to a BindingList and then set that as the grid’s datasource.

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

Sidebar

Related Questions

I'm validating that part of my form is complete before submission and trying to
I am currently trying to complete a project using Qt4 and C++. I am
I'm currently trying to build a more or less complete set of unit tests
I currently trying to find a solution, how to ensure that a test fails
I'm currently building an Excel 2003 app that requires a horribly complex form and
I currently have a couple of forms that I'm trying to change the button
Please forgive a question that has been addressed in some form or fashion previously.
I'm trying to implement an 'edit' link that brings up a form to change
I'm currently trying to read in an XML file, make some minor changes (alter
I'm currently trying out db4o (the java version) and I pretty much like what

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.