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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:35:30+00:00 2026-06-10T11:35:30+00:00

I have a DGV bound to an IEnumerable. T has a boolean property which

  • 0

I have a DGV bound to an IEnumerable. T has a boolean property which can be get/set. When loading the table, the get property is accessed to populate the DataGridViewCheckboxColumn. I can see it being hit in the debugger. When I click a cell in the checkbox column, the checkbox is checked as you’d expect, but the underlying data source isnt’ updated, and the property setter isn’t called. The checkbox column has the ReadOnly property set to false.

How can I get this to update the underlying bound data?

polygonListBindingSource.DataSource = m_displayPolygons.OrderBy(p => p.Name);

I’ve seen related questions, but they’re not consistant in their answers. Some suggest calling EndEdit on the DGV, other suggest calling it on the binding source. Do I really have to subscribe to an event for when the cell value is changed to actually commit the change to the underlying data type? This seems unnatural.

  • 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-10T11:35:32+00:00Added an answer on June 10, 2026 at 11:35 am

    This is down to the fact that the DataGridView only commits its edits when the current cell loses focus. Clicking on the checkbox isn’t enough to commit the edit.

    The standard was to do this is to use events, usually the CurrentCellDirtyStateChanged event:

    void dataGridView1_CurrentCellDirtyStateChanged(object sender, EventArgs e)
    {
        if (dataGridView1.IsCurrentCellDirty)
        {
            dataGridView1.CommitEdit(DataGridViewDataErrorContexts.Commit);
        }
    }
    

    It is a bit unnatural but is by design – this way your data source doesn’t get flooded by edits that may not be final. Not necessarily such a big deal for a checkbox but a worthwhile design decision for the text box cell.

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

Sidebar

Related Questions

I have a bound DGV that took a bit of work to get its
I have a DGV that has its datasource set to a BindingList. There is
I have a datable myTable, which is bind with a DataGridView dgv. The DataGridView
Here's what I'm doing: I have (2) DataGridView controls DGV #1 is bound to
I have a DataGridView which has different rows and columns and it work perfectly
I have a database that has a Users table and I present the data
I have a DataGridView (called DataGridViewSecurity) in VB.net (Visual Studio 2010) which is bound
I have a DGV I am binding to a list of objects. I set
I have a .NET windows app. I have a DataGridView which has a few
I have the DGV bound to data and all the other controls properly. 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.