触发DataGridView中的复选框值更改事件 [英] Triggering a checkbox value changed event in DataGridView
问题描述
一旦单元格值更改,有什么可以触发网格视图上的事件吗?
最好的问候,
我的同事建议您捕获CurrentCellDirtyStateChanged事件。请参阅 http://msdn.microsoft.com/ en-us / library / system.windows.forms.datagridview.currentcelldirtystatechanged.aspx 。
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?
Best Regards,
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屋!