本文介绍了DataGridCheckBoxColumn的点击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在WPF表单中有一个 DataGrid
,其中包含一个 DataGridCheckBoxColumn
,但是我没有找到任何点击事件,检查并取消选中...
I have a DataGrid
in a WPF form with a DataGridCheckBoxColumn
, but I did not find any click event, Checked and unchecked for it...
这些事件是否可用于 DataGridCheckBoxColumn
?如果没有,请建议我可以使用一些解决方法。
Are these events available for the DataGridCheckBoxColumn
? If not please suggest some workaround I could use.
推荐答案
这些不会通过单独的DataGridCell访问,而不是整个列?
Won't these be accessed via the individual DataGridCell rather than the whole column?
我知道这些事件并不直接在DataGridCell上,而是有CommandBindings方法:
I know these events aren't directly on the DataGridCell, but there is the CommandBindings method:
// Summary:
// Gets a collection of System.Windows.Input.CommandBinding objects associated
// with this element. A System.Windows.Input.CommandBinding enables command
// handling for this element, and declares the linkage between a command, its
// events, and the handlers attached by this element.
//
// Returns:
// The collection of all System.Windows.Input.CommandBinding objects.
这是否有帮助?
这篇关于DataGridCheckBoxColumn的点击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!