引发DataGridView的复选框值更改事件 [英] Triggering a checkbox value changed event in DataGridView

查看:531
本文介绍了引发DataGridView的复选框值更改事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有都有一个复选框列网格视图,我想尽快的单元格的值切换触发事件绘制。我试过ValueChaged和CellEndEdit和BeginEdit,并选择选择模式为CellSelect。作为第一个2的事件,是在编辑模式的精加工触发事件,如移动出当前小区的,或来回。这只是一个怪异的行为。

I have a grid view that has a check box column, and I want to trigger a drawing event as soon as the value of the cell is toggled. I tried the ValueChaged and the CellEndEdit and BeginEdit, and chose the selection mode as CellSelect. As for the the first 2 events, the event was triggered upon the finishing of the edit mode, like moving out of the current cell, or going back and forth. It's just a weird behavior.

有什么,只要单元格的值发生改变?触发网格视图事件

Is there anything that triggers the event on the grid view as soon as the cell value is changed?

最好的问候,

推荐答案

我的一位同事推荐圈住CurrentCellDirtyStateChanged事件。见<一href=\"http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.currentcelldirtystatechanged.aspx\">http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.currentcelldirtystatechanged.aspx.

A colleague of mine recommends trapping the CurrentCellDirtyStateChanged event. See http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.currentcelldirtystatechanged.aspx.

这篇关于引发DataGridView的复选框值更改事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆