DataGridView / CheckBox column?`

Posted on 2009-12-23
Last Modified: 2013-11-08
I'm using and DataGridView and Winforms.
What Event should I use when I want to be alerted when the Checkbox has changed?
Question by:Jess31
    LVL 8

    Expert Comment

    Datagridview ---> CellValueChanged event

    Author Comment

    This does not work. Only when you leave the Cell, not when the checkbox check changed.
    LVL 8

    Expert Comment

    I see. So you want the event raised right after the value of checkbox changed, then to my knowledge there's no way to do that. I tried many different ways on my project but couldn't find any good solution. So i had to use CellValueChanged, not very good but at least it did the job. Someone can do this plz post the solution.
    LVL 10

    Expert Comment

    From MSDN.

    In the case of check box cells, however, you will typically want to handle the change immediately. To commit the change when the cell is clicked, you must handle the DataGridView..::.CurrentCellDirtyStateChanged event. In the handler, if the current cell is a check box cell, call the DataGridView..::.CommitEdit method and pass in the Commit value.


    It seems that you need to handle DataGridView.CurrentCellDirtyStateChanged Event.
    LVL 10

    Accepted Solution


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now