vb.net 使用 DataGridViewCheckBoxCell 时要检查的最佳事件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17836208/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Best Event to check when using a DataGridViewCheckBoxCell
提问by Blake
I have a DataGridView that contains 1 column defined as a checkbox. I'm not sure which event to use to check whether the cbo has been checked or unchecked. I've been playing with the CellValueChanged event but notice that when I check a box, nothing happens until I do another action. I need the program to react immediately upon checking a box and not waiting until another action is performed.
我有一个包含 1 列定义为复选框的 DataGridView。我不确定要使用哪个事件来检查 cbo 是否已选中或未选中。我一直在玩 CellValueChanged 事件,但请注意,当我选中一个框时,在我执行另一个操作之前什么也不会发生。我需要程序在选中一个框时立即做出反应,而不是等到执行另一个操作。
Any ideas?
有任何想法吗?
回答by Karl Anderson
It sounds like CurrentCellDirtyStateChangedevent is your ticket.
听起来CurrentCellDirtyStateChanged活动是您的门票。
Check out Triggering a checkbox value changed event in DataGridView

